| name | contextualize-results |
| description | Research and explain Kai outputs - find academic papers, benchmarks, and prior art that explain WHY results work |
| version | 1.0.0 |
| author | kai-agent |
| metadata | {"kai":{"tags":["kai","research","academic","papers","benchmarks","analysis"]}} |
Contextualize Kai Results
After Kai produces results (security findings or optimized code), go deeper. Find the academic and practical context that explains WHY the results are what they are.
When to use
- After an optimization produces an improved solution
- After a code audit finds interesting vulnerability patterns
- When the team asks "why does this work?" or "how does this compare?"
Research workflow for optimization results
1. Understand what changed
Compare the optimized code with the original:
get_optimized_programs(optimizationId) → best solution
read_repository_files(workspaceId, repoId, paths) → original code
Identify the algorithmic changes:
- Data structure changes (array to hash map, linked list to skip list)
- Algorithm family changes (comparison sort to radix sort, BFS to A*)
- Optimization techniques (loop unrolling, memoization, SIMD hints)
- Mathematical insights (algebraic simplifications, numerical stability)
2. Search for academic context
Use web_search and browser tools to find relevant research:
For algorithm changes:
- Search: "[algorithm name] time complexity analysis"
- Search: "[old algorithm] vs [new algorithm] benchmark comparison"
- Check: arXiv.org, Google Scholar, ACM Digital Library
For optimization techniques:
- Search: "[technique] performance impact [language/platform]"
- Search: "[technique] trade-offs limitations"
- Check: performance engineering blogs, language-specific optimization guides
For data structure changes:
- Search: "[data structure] vs [data structure] performance characteristics"
- Search: "[data structure] cache efficiency memory layout"
3. Find benchmarks and comparisons
- Search: "[problem domain] benchmark state of the art"
- Check: Papers with Code (paperswithcode.com) for ML-related optimizations
- Check: GitHub benchmark repositories for the specific domain
- Compare Kai's improvement with published results
4. Assess significance
Frame the results:
- Is this a known optimization that Kai rediscovered? (Still valuable, validates the approach)
- Is this a novel combination of techniques? (More interesting)
- How does the improvement compare to published benchmarks?
- What are the trade-offs? (Memory vs speed, complexity vs performance)
5. Report with context
Structure the report:
- What changed: Technical diff summary
- Why it works: Academic/theoretical explanation
- How it compares: Benchmarks, state of the art
- Trade-offs: What was sacrificed for the improvement
- References: Links to relevant papers and resources
- Next steps: Further optimization opportunities
Research workflow for security findings
1. Classify the vulnerability
Map to standard taxonomies:
- OWASP Top 10 category
- CWE (Common Weakness Enumeration) ID
- CVSS score context
2. Find historical parallels
- Search: "CVE [vulnerability type] [framework]"
- Search: "[vulnerability type] real world breach impact"
- Check: NVD (National Vulnerability Database), Snyk vulnerability DB
3. Industry context
- How common is this vulnerability class in similar projects?
- What's the typical remediation approach?
- Are there automated fixes or migration tools?
Research sources (ordered by reliability)
- arXiv.org - Preprints, cutting edge (use browser_navigate)
- Google Scholar - Broad academic search (use web_search)
- Papers with Code - ML benchmarks and implementations
- ACM/IEEE Digital Libraries - Peer-reviewed research
- HuggingFace - Models, datasets, spaces for ML context
- GitHub - Reference implementations, benchmarks
- NVD/CVE databases - Vulnerability context
- Tech blogs (company engineering blogs) - Practical insights
Tips
- Always cite your sources with URLs
- Distinguish between theoretical analysis and empirical results
- Note the publication date of papers (methods may be superseded)
- Cross-reference multiple sources for reliability
- Save research findings in memory for future reference