RAG Query Sources Missing the similarity Field
Β· 3 min read
Debugging the query-result response format in a RAG knowledge-base project β the full troubleshooting trail below.
TL;DRβ
The RAG /query endpoint returned sources containing metadata only, with no per-source similarity score. Fix: merge metadatas and distances while assembling the response, computing similarity = 1 - distance for each source.