Back to selected work
PERSONAL PROJECT / CASE STUDY 03 / 03

AI & retrieval systems

Doc Chat

Route the question. Retrieve the evidence. Then ask the model.

Doc Chat is a retrieval system before it is a chat interface. A React client talks to a Python backend that selects the right retrieval operation, gathers evidence, and only then uses an LLM to compose an answer.

Open public project

SYSTEM ARCHITECTURE

Different questions take different retrieval paths

A query router can choose structured PostgreSQL lookup, semantic retrieval through embeddings and pgvector, or a hybrid of both. Candidates are reranked before the best evidence reaches the language model.

ENGINEERING STORY

01 / INGESTION

Documents become retrievable evidence

Ingestion separates parsing, chunking, metadata, and embedding creation. The result supports both semantic similarity and deterministic filtering over the same document collection.

02 / HYBRID RETRIEVAL

Not every question belongs in vector search

Questions about identifiers, ownership, counts, or metadata can use structured queries. Content questions use semantic retrieval. Mixed questions combine both sources before answer generation.

03 / ORCHESTRATION

Probabilistic reasoning has deterministic boundaries

An agent-style workflow selects focused operations such as entity resolution, structured querying, semantic search, hybrid retrieval, and answer generation. The model is part of the control flow, not a replacement for application logic.

04 / QUALITY

Reranking improves what the model gets to see

Initial retrieval produces candidate passages. A reranking stage prioritizes the strongest evidence so the final generation step works with a smaller, more relevant context.

05 / LANGUAGE

Designed for Hungarian and English collections

The document and question-processing workflow accounts for both Hungarian and English content without claiming language support beyond those implemented use cases.

TECHNICAL FOUNDATION

Layers of the system

Frontend

ReactJavaScript

AI backend

PythonFastAPILangChainLLM APIs

Retrieval data

PostgreSQLpgvectorVector embeddings

Implemented capabilities

  • Document ingestion, parsing, chunking, and embedding pipelines
  • Semantic, structured, and hybrid retrieval paths
  • Tool-oriented query routing and entity resolution
  • Candidate reranking before LLM-based answer generation
  • Hungarian and English document/question processing
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed. Trying again in seconds.

Failed to rejoin. Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session. Please retry or reload the page.