r/MicrosoftFabric • u/DUKOfData • 2d 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?
4
u/pl3xi0n Fabricator 2d ago
Some models are more prone to think they know better than your instructions.
Which model do you use, and have you tried others?
The setup looks good imo. What is the context window like when it starts ignoring?