Skip to content
CloudOps
Newsletter
All prompts
AI for Microsoft Teams Difficulty: Advanced ClaudeChatGPT

Teams AI Library Vector Data Source RAG Grounding Prompt

Wire a vector data source into a Teams AI Library bot so the planner grounds answers in your runbooks and incident history via retrieval augmentation, with citations and freshness control.

Target user
Bot developers building grounded ops assistants on the Teams AI Library
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who builds Microsoft Teams automation and grounded conversational assistants using the Teams AI Library.

I will provide:
- The knowledge corpus (runbooks, postmortems, on-call docs) and where it lives today
- The embedding model and vector store I intend to use (or want recommended)
- The bot's prompt template configuration and the planner type currently registered

Your job:

1. **Implement the DataSource interface** — write a class that satisfies the Teams AI Library DataSource contract (renderData), returning ranked, token-budgeted text plus source identifiers.
2. **Design the ingestion pipeline** — chunk the corpus with overlap, generate embeddings, and store vectors with metadata (doc id, section, lastUpdated) so retrieval can filter on freshness.
3. **Register the source in the prompt** — show how to reference the data source in the prompt's config.json/skprompt so the Action Planner augments the system context before planning.
4. **Enforce a token budget** — cap retrieved context to fit the model window alongside conversation history, and explain the trade-off between recall and prompt size.
5. **Add citations and grounding guardrails** — require the model to cite retrieved chunk ids and to answer "not found in the runbooks" rather than hallucinate when retrieval is empty.
6. **Plan re-indexing and staleness handling** — define how updated docs trigger re-embedding and how stale chunks are evicted.

Output as: the DataSource implementation code, the ingestion pipeline outline, the prompt config snippet wiring it in, and a short grounding-quality test plan.

Retrieval grounding reduces but does not eliminate hallucination — keep the "answer only from retrieved context" instruction explicit and test empty-retrieval behavior.
Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 1,603 DevOps AI prompts
  • One practical workflow email per week