Back home

Technical Notes

Bite-sized things I learned building real systems.

Hybrid Retrieval in RAG

Run a metadata-filtered search (e.g. content_type + technology) and an unfiltered similarity search in parallel. Merge filtered-first, dedup by chunk ID. Filtered results give precision; unfiltered results fill context gaps the filters miss.

RAGQdrant

Query Rewriting Before Vector Search

Rewrite conversational messages into standalone search queries using an LLM + chat history before hitting the vector store. "Yeah what about that?" becomes "What mobile development services are available?" Single biggest retrieval quality improvement I've made.

RAGLLM

Parallel LLM Calls for Latency

When you need multiple independent LLM classifications (intent, entity extraction, query rewriting, ambiguity check), run them concurrently with a ThreadPoolExecutor. Total latency = slowest call, not the sum. deepcopy the state first; mutable dicts + threads = subtle bugs.

LangGraphPython

When Retrieval Returns Nothing

If the vector store returns zero relevant documents, skip the LLM entirely and return a templated honest response. The retriever is your ground truth. Letting the LLM fill the gap is how hallucinations happen in production.

RAGLLM