Read the full Agentic Analytics Playbook
Getting Started with Context Engineering
This playbook provides a systematic approach to building and maintaining effective context for your analytics agent. Follow these steps in order to ensure a solid foundation and scalable growth.First POC on small, reliable context
Step 1: Add Your Data Context Start with a restricted perimeter of your data warehouse:- Maximum 20 tables to begin with
- Focus on clean, gold, or mart layer tables (avoid raw staging tables)
- Choose tables that represent core business domains
- dbt documentation (schema.yml, docs blocks)
- Semantic layer definitions
- Any other relevant documentation repositories
- Your company - business context, terminology, conventions
- Different domains covered by your 20 tables - e.g., sales, marketing, finance, operations
- Business definitions - what key terms mean in your organization
- Metrics definitions - how metrics are calculated and used
- List of tables - which tables belong to this domain
- Relevant docs yaml - specific documentation for this domain
Measure, test and iterate
Step 5: Create a Set of 20 Key Questions Develop a test suite of 20 key questions that represent:- Common user queries
- Critical business questions
- Edge cases
- Different complexity levels
- Run all questions through the agent
- Verify answers are correct and complete
- Identify gaps in context or understanding
- Iterate on context - add missing information, clarify ambiguities, refine rules
Evaluation Guide
Learn how to build comprehensive test suites and integrate testing into your workflow
- Roll out to a small group of users initially
- Track usage - monitor what questions users are asking
- Monitor real-life performance using logs of questions and feedback
- Collect user feedback to identify improvement areas
- Version your context using git repositories
- Run
nao testfrequently (e.g., weekly or after major changes) - Ensure context quality doesn’t drift as you make updates
- Set up automated tests in CI/CD pipelines
- Track test results over time to monitor performance trends
Close the feedback loop
Step 9: Let Recommendations Surface the Next Fix Your 20 test questions catch regressions, but they can’t predict every question real users will ask. Once the agent is live, turn production usage into your next backlog:- Enable Recommendations so nao audits its own usage on a schedule and ranks where your context is missing, wrong, or unclear.
- Work the impact-ordered list: tool errors, downvotes, and recurring questions each point at a specific file to fix.
- Open the fix as a pull request straight from a recommendation when a GitHub repo is connected, then re-run
nao testto confirm it holds.
nao test guards the benchmark you wrote, Recommendations finds the gaps you didn’t. Feeding production friction back into context (and into new test cases) is what keeps the agent improving instead of drifting.
Scale
Step 10: Scale Gradually As adoption grows:- Extend the number of datasets available in the agent
- Make documentation and rules modular to support scalability
- Add new domains incrementally, following the same process
- Maintain the same quality standards as you expand
Context Principles
Review the core principles that guide effective context engineering.