Copilot was falling back to text search instead of using the MCP-backed graph context #500
Replies: 1 comment
-
|
Great write-up and thanks for sharing your instruction file — this is exactly the kind of real-world feedback that helps improve the default skill. To answer your questions directly:
Your context numbers (28% vs 53%) are a great concrete data point — pinning this for anyone else hitting the same issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Copilot was falling back to text search instead of using the MCP-backed graph context
Summary
I ran into an issue where GitHub Copilot was not behaving like I expected in a large project. Instead of consistently using the MCP-backed knowledge graph / structured context, it seemed to fall back to plain text search and direct file scanning.
After I changed the instruction file, the behaviour improved and Copilot started using the graph context much more effectively.
What I expected
I expected Copilot to:
What actually happened
Before the instruction change, Copilot appeared to rely mostly on text search and raw file exploration. In a repeated Q&A session on the same codebase, context usage climbed quickly and the session compacted earlier than expected.
Observed behaviour before the fix
Observed behaviour after the fix
Once I updated the instruction file, Copilot behaved much better in the same style of workflow.
What I changed
The main change was updating the instruction file so Copilot had clearer guidance to use the graph / MCP-backed workflow rather than defaulting to text search.
That change made a visible difference in how the assistant handled the same project questions.
Questions I’m asking
Proof / screenshots
After Graphify-assisted workflow
Non-graphify workflow
Why this matters
For large, interconnected projects, repeated text search becomes expensive and harder to trust. A structured graph workflow keeps the session more stable and makes it easier to answer follow-up questions about related features, flows, and dependencies.
My takeaway
The instruction file change made the biggest difference. Without it, Copilot seemed to stay too close to text search. With it, the assistant started acting much more like a graph-aware coding partner. And use this MCP server for project only as different projects have different graphs.
If anyone has tips for making this more reliable, I’d love to hear them.
--
Here is the same copilot-instruction file I used to resolve this occurring issue :
MANDATORY: Use Knowledge Graph Before Anything Else
This project has a pre-built knowledge graph at
graphify-out/graph.json.RULES (follow strictly):
query_graphMCP tool FIRSTget_neighborsorshortest_pathFIRSTHow to Use the Graph
Only Fall Back to Files When
thanks for this @safishamsi
Beta Was this translation helpful? Give feedback.
All reactions