The GraphDx framework uses a knowledge graph to stop LLMs from ordering excessive medical tests. It deploys three collaborative agents to balance diagnostic accuracy against resource costs. This approach bridges the knowledge-reasoning gap in sequential diagnosis. Practitioners can now automate cost-sensitive clinical decision-making without sacrificing precision in patient outcomes.