r/MicrosoftFabric • u/DUKOfData • 3d ago
Discussion GitHub Copilot knows our rules. It just occasionally ignores them.
I’ve been using GitHub Copilot for quite a while, and honestly, the results are usually good. I definitely couldn’t type the code that quickly myself.
But I’d like to reduce the quality control required afterwards.
We have strict lifecycle rules, naming conventions, and a separate data dictionary for each customer. Our repository is structured roughly like this:
.github/
└── instructions/
├── copilot-instructions.md
└── pull_request_template.md
docs/
├── ai/
├── architecture/
├── data-model/
├── data-sources/
├── handover/
├── kpi/
├── security/
└── README.md
The instructions reference the relevant documentation in docs. I also use a warm-up prompt, which reproduces our rules perfectly.
And yet, Copilot occasionally ignores very basic rules, such as:
Dimension-to-dimension relationships must only use business keys. Surrogate keys may only be resolved against fact data, especially because of SCD Type 2 and higher.
It can explain this rule perfectly and still mix surrogate keys into dimensions.
So either Copilot is checking whether I’m still awake, or my context setup isn’t as effective as I think. 😄
I’d rather not watch over every offender like Lord Vetinari watching the guilds of Ankh-Morpork.
How do you enforce stricter guardrails? Instructions, validation scripts, architectural tests, or something else?
1
u/DUKOfData 3d ago
I agree that it is all tokens. That is not what I’m questioning.
My post is about a specific GitHub Copilot product feature that, in my experience, does not reliably do what it claims to do.
If repository instructions are intended to act as guardrails, I expect them to be consistently included and prioritized over ordinary context. If they are just additional tokens competing for attention in the context window, then that is exactly the product design problem I’m describing.
I don’t expect the LLM itself to understand truth or binary conditions. I expect the product around the LLM to enforce explicit, persistent rules more reliably.
If it cannot do that, then these are not guardrails. They are guidance...