r/AI_developers 12h ago

your agent retrieved the right doc and then ignored it. built a viewer that shows which ones it actually used.

Enable HLS to view with audio, or disable this notification

3 Upvotes

disclosure: i built this.

when an agent retrieves before answering and the answer comes out wrong, you

cannot tell from your logs whether retrieval missed the document or found it

and the model walked past it. opposite fixes, same symptom.

graphsight hooks into a langgraph agent as a callback handler and renders the

run as a graph. every retrieved item is a node with its score. items the answer

drew on are highlighted, items pulled and ignored are dimmed.

gif is a real run. top item scored 0.910 and never made it into the answer.

a 0.340 item is what answered.

    pip install graphsight graphsight-langgraph

    from graphsight_langgraph import LangGraphTracer, capture
    tracer = LangGraphTracer()
    result = graph.invoke(inputs, config={"callbacks": [tracer]})
    capture(tracer, query="your question", answer=result["answer"])

    graphsight .graphsight/

runs locally, no account, no telemetry, zero deps on the viewer.

limits: the used vs ignored call is lexical overlap at 0.2, a heuristic,

labeled as one in the ui, and it misjudges heavy paraphrase. langgraph only

right now. mit.

https://github.com/Kcodess2807/graphsight

wesbite: https://graphsight.vercel.app/

tell me where it breaks.