← All questions
RAGHard· Graph RAG· Inference Cost· System Design

Compare the retrieval cost of a hop-by-hop LLM search l...

In a hop-by-hop LLM search (ToG), the cost scales with the number of hops (h) and the beam width (w) because the LLM is re-invoked at every step of the beam. In contrast, a plan-then-ground approach (RoG) makes a fixed number of LLM calls—roughly two—independent of the number of hops, because the grounding is delegated to exact graph search. The trade-off is that RoG’s plans do not see entity-specific context until after grounding, whereas ToG benefits from that context at every hop.

Code playground (Python)