Hacker News new | ask | show | jobs
by ckrapu 971 days ago
I’m really interested in content explaining how to navigate graphs of embedded items for Q/A. Any resources on how to do this or arguments for why it’s a bad approach?

For example, if my top K docs aren’t answering the question but each are linked to neighbors, I’d want to know some folk wisdom or tricks for structuring the neighbor graph to cheaply expand the set of useful results.

3 comments

You could in theory create a tool/function like “Context Retrieval”, give it to an Agent, and instruct the Agent to paginate through it as needed. This would add some errors due to LLM usage and latency though.

And then of course you would still need to design the graph structure. Maybe neo4j or similar graph dbs would be useful? I have seen a langchain integration for instance: https://python.langchain.com/docs/integrations/providers/neo...

Not using neighbour, but Autogen has a multi-agent pipeline where if a question is not answered by top K docs, the agent can request "UPDATE CONTEXT" and pull the next set of results.

See example 5 here: https://github.com/microsoft/autogen/blob/main/notebook/agen...

Wouldn't more semantically related neighbors be retrieved by just increasing K?
Potentially, yes! The scenario I am imagining is that context A as context for a query yields results 1, 2, and 3. Sometimes, finding neighbors of 1 (ie not necessarily in the top K w.r.t A) instead of going to results 4, 5, 6 might be better.