Document Q&A with Citations by Randy JohnsonDocument Q&A with Citations by Randy Johnson

Document Q&A with Citations

Randy Johnson

Randy Johnson

The problem

Getting a trustworthy answer out of a document collection takes more than semantic search. The system needs to know when to actually search versus answer directly, and it needs to show where an answer came from rather than just assert it.

The core layer

Document Analysis Engine pairs a standard retrieval pipeline, chunk, embed, store in Chroma, with a tool-calling agent. An LLM planner routes each question to RAG search, a document inventory and stats tool, or a chart tool, so the model decides what a question actually needs rather than defaulting to one path. Session-scoped conversation history in SQLite lets follow-up questions carry context.

The implementation

One shared service layer is exposed 3 ways: FastAPI, a Streamlit UI, and a terminal client, supporting PDF, TXT, and Markdown ingestion with local sentence-transformer embeddings. Retrieval, ingestion, chart, and memory tests run without any LLM call; the full agent-loop test skips gracefully when no provider is configured.
Like this project

Posted Aug 25, 2026

Transform documents into source-linked answers with transparent retrieval.