Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Chat endpoints, embeddings, RAG workflows, vector search
.claude/skills/majiayu000-koan-ai-integration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -43% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 13% | 0% |
AI capabilities integrate seamlessly with entity patterns. Store embeddings on entities, use vector repositories for search, and leverage standard Entity<T> patterns for AI-enriched data.
csharppublic class ChatController : ControllerBase { private readonly IAi _ai; [HttpPost] public async Task<IActionResult> Chat( [FromBody] ChatRequest request, CancellationToken ct) { var response = await _ai.ChatAsync(new AiChatRequest { Model = "gpt-4", Messages = request.Messages, SystemPrompt = "You are a helpful assistant.", Temperature = 0.7 }, ct); return Ok(new { message = response.Content, usage = response.Usage }); } }
csharp[DataAdapter("weaviate")] // Force vector database public class ProductSearch : Entity<ProductSearch> { public string ProductId { get; set; } = ""; public string Description { get; set; } = ""; [VectorField] public float[] DescriptionEmbedding { get; set; } = Array.Empty<float>(); // Semantic search public static async Task<List<ProductSearch>> SimilarTo( string query, CancellationToken ct = default) { return await Vector<ProductSearch>.SearchAsync(query, limit: 10, ct); } }
csharppublic class KnowledgeBaseService { private readonly IAi _ai; public async Task<string> AnswerQuestion(string question, CancellationToken ct) { // 1. Find relevant documents via vector search var relevantDocs = await KnowledgeDocument.SimilarTo(question, ct); // 2. Build context from documents var context = string.Join("\n\n", relevantDocs.Select(d => d.Content)); // 3. Query AI with context var response = await _ai.ChatAsync(new AiChatRequest { Model = "gpt-4", SystemPrompt = $"Answer based on this context:\n\n{context}", Messages = new[] { new AiMessage { Role = "user", Content = question } } }, ct); return response.Content; } }
json{ "Koan": { "AI": { "Providers": { "Primary": { "Type": "OpenAI", "ApiKey": "{OPENAI_API_KEY}", "Model": "gpt-4" }, "Fallback": { "Type": "Ollama", "BaseUrl": "http://localhost:11434", "Model": "llama2" } } }, "Data": { "Sources": { "Vectors": { "Adapter": "weaviate", "ConnectionString": "http://localhost:8080" } } } } }
docs/guides/ai-integration.mddocs/guides/ai-vector-howto.mdsamples/S5.Recs/ (AI recommendation engine)samples/S16.PantryPal/ (Vision AI integration)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,461 | 11,600 | -14% | 1 | 1 | 0% | 2,374 | 2,080 | -12% | 0 | 0 | — |
case-02 | fail→pass | 28,774 | 12,227 | -58% | 1 | 1 | 0% | 3,909 | 2,214 | -43% | 0 | 0 | — |
case-03 | fail→pass | 9,793 | 9,744 | -1% | 1 | 1 | 0% | 1,893 | 1,754 | -7% | 0 | 0 | — |
case-04 | pass→pass | 14,113 | 11,784 | -17% | 1 | 1 | 0% | 2,707 | 2,115 | -22% | 0 | 0 | — |
case-05 | pass→pass | 16,702 | 10,051 | -40% | 1 | 1 | 0% | 1,992 | 1,775 | -11% | 0 | 0 | — |
case-06 | pass→pass | 11,964 | 10,117 | -15% | 1 | 1 | 0% | 2,364 | 2,736 | +16% | 0 | 0 | — |
case-07 | fail→pass | 13,633 | 2,672 | -80% | 1 | 1 | 0% | 1,268 | 1,272 | +0% | 0 | 0 | — |
case-08 | fail→pass | 15,145 | 16,307 | +8% | 1 | 1 | 0% | 2,606 | 2,954 | +13% | 0 | 0 | — |
case-09 | fail→pass | 13,665 | 3,010 | -78% | 1 | 1 | 0% | 1,298 | 1,359 | +5% | 0 | 0 | — |
case-10 | pass→pass | 6,540 | 7,656 | +17% | 1 | 1 | 0% | 1,067 | 1,258 | +18% | 0 | 0 | — |
case-11 | fail→pass | 15,365 | 10,001 | -35% | 1 | 1 | 0% | 2,634 | 1,828 | -31% | 0 | 0 | — |
case-12 | fail→pass | 13,648 | 3,994 | -71% | 1 | 1 | 0% | 1,287 | 1,475 | +15% | 0 | 0 | — |
case-13 | pass→pass | 23,075 | 2,113 | -91% | 1 | 1 | 0% | 2,871 | 1,165 | -59% | 0 | 0 | — |
case-14 | fail→pass | 17,644 | 3,856 | -78% | 1 | 1 | 0% | 1,985 | 1,549 | -22% | 0 | 0 | — |
case-15 | fail→pass | 18,682 | 8,437 | -55% | 1 | 1 | 0% | 2,417 | 1,438 | -41% | 0 | 0 | — |
case-16 | fail→pass | 27,608 | 8,079 | -71% | 1 | 1 | 0% | 4,426 | 1,336 | -70% | 0 | 0 | — |
case-17 | pass→pass | 17,880 | 10,443 | -42% | 1 | 1 | 0% | 2,448 | 1,914 | -22% | 0 | 0 | — |
case-18 | fail→pass | 11,536 | 3,915 | -66% | 1 | 1 | 0% | 1,846 | 1,331 | -28% | 0 | 0 | — |
case-19 | fail→pass | 12,181 | 8,642 | -29% | 1 | 1 | 0% | 2,004 | 1,495 | -25% | 0 | 0 | — |
case-20 | fail→pass | 16,151 | 6,799 | -58% | 1 | 1 | 0% | 1,902 | 1,147 | -40% | 0 | 0 | — |
case-21 | pass→pass | 22,943 | 3,739 | -84% | 1 | 1 | 0% | 2,831 | 1,495 | -47% | 0 | 0 | — |
case-22 | pass→pass | 23,053 | 14,211 | -38% | 1 | 1 | 0% | 2,907 | 2,683 | -8% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +64 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.