GraphNews
a RAG system for biomedical research that uses both vector search and knowledge graphs.
Turns out, you need both.
Vector databases, such as Qdrant, are excellent at handling semantic similarity, but they struggle with relationship queries.
𝐓𝐡𝐞 𝐢𝐬𝐬𝐮𝐞: Author networks, citations, and institutional collaborations aren't semantic similarities. They're structured relationships that don't live in embeddings.
𝐓𝐡𝐞 𝐡𝐲𝐛𝐫𝐢𝐝 𝐚𝐩𝐩𝐫𝐨𝐚𝐜𝐡
I combined Qdrant for semantic retrieval with Neo4j for relationship queries, using OpenAI's tool-calling to orchestrate between them.
The workflow:
1️⃣ User asks a question 2️⃣ Qdrant retrieves semantically relevant papers 3️⃣ LLM analyzes the query and decides which graph enrichment tools to call 4️⃣ Neo4j returns structured relationship data 5️⃣ Both sources combine into one answer
Same query with the hybrid system: Returns 4 specific collaborators with paper counts, plus relevant research context.
𝐈𝐦𝐩𝐥𝐞𝐦𝐞𝐧𝐭𝐚𝐭𝐢𝐨𝐧 𝐧𝐨𝐭𝐞𝐬
I initially tried having the LLM generate Cypher queries directly, but tool-calling worked much better. The LLM decides which pre-built tool to call, as the tools themselves contain reliable Cypher queries, and LLMs are not yet good enough at Cypher query generation
For domains with complex relationships, such as biomedical research, legal documents, and enterprise knowledge, combining vector search with knowledge graphs gives you capabilities neither has alone.
https://www.linkedin.com/posts/activity-7397237155716063232-0pku/