A fluent answer is easy to mistake for a reliable one. For a document assistant, the useful question is: can we trace this answer back to the right information? My document RAG project brings file ingestion, retrieval, reranking, and source references into one workflow.
First, make the documents searchable
In my project, a directory watcher notices newly uploaded files and starts document processing. The content is extracted, divided into chunks, and stored for vector search. The source information needs to travel with those chunks so the final answer can identify the document behind it.
This is the ingestion path. Uploading a file prepares knowledge for future questions; it does not by itself prove that the application will find the right passage. A scan, a table, and a plain-text document can produce very different extraction results.
Then, find and rerank the evidence
When a question arrives, retrieval selects candidate passages. A reranker can compare the question against those candidates and reorder them by relevance before they reach the language model. Sentence Transformers documents this two-stage retrieve-and-rerank pattern.
Reranking belongs to the question-answering path, after initial retrieval. It is not a replacement for extraction or indexing, and it cannot recover useful evidence that never made it into the candidate set.
Leave room for “I don’t have enough evidence”
My application can search the context again when more information is needed. The portfolio’s interactive example also shows a question that the demonstration documents do not support. An honest limit is more useful than a confident invented allowance or policy.
A source reference should let the reader inspect the evidence. It should not be treated as a correctness badge: the cited passage still needs to support the actual claim.
Questions worth asking before a rollout
These are design and evaluation questions, not claims that every item has already been implemented in my project. The portfolio demonstration uses sample documents and scripted results; it is there to make the architecture understandable.
- Can users find the original document and relevant passage?
- What happens when a document changes or is removed?
- Do access rules apply during retrieval, not just in the interface?
- How does the system behave on questions outside the documents?
- Does reranking improve the answers enough to justify its added latency?
What could this make easier for you?
Bring the problem. We can work out which tools belong in the solution.
Discuss your idea ↗