Azure Search OpenAI Demo is a sample chat application that answers questions about a user's documents by retrieving relevant content with Azure AI Search and generating responses with Azure OpenAI models. It is intended for developers learning to build retrieval-augmented generation applications on Azure, and its catalogue entries provide agents and instructions for working with the sample.
Borrowing it
Nothing to install: this file belongs to Azure-Samples/azure-search-openai-demo. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Azure-Samples/azure-search-openai-demo/main/AGENTS.mdgit clone --depth 1 https://github.com/Azure-Samples/azure-search-openai-demoWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/azure-samples/azure-search-openai-demo/agents-md)<a href="https://agentmods.dev/instructions/azure-samples/azure-search-openai-demo/agents-md"><img src="https://agentmods.dev/badge/instructions/azure-samples/azure-search-openai-demo/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/azure-samples/azure-search-openai-demo/agents-md"><img src="https://agentmods.dev/badge/instructions/azure-samples/azure-search-openai-demo/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.05202 | $0.05202 |
| Opus 5 | $0.02601 | $0.02601 |
| Sonnet 5 | $0.01040 | $0.01040 |
| Haiku 4.5 | $0.00520 | $0.00520 |
Grade A, and why
azure-search-openai-demo AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
5. **Verify auth enforcement with curl** (both should return `HTTP 401` because Container Apps Easy Auth blocks unauthenticated traffic before the app sees the request): How it starts
The opening of the file, as written. The whole thing — 402 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Instructions for Coding Agents
This file contains instructions for developers working on the Azure Search and OpenAI demo application. It covers the overall code layout, how to add new data, how to add new azd environment variables, how to add new developer settings, and how to add tests for new features.
Always keep this file up to date with any changes to the codebase or development process. If necessary, edit this file to ensure it accurately reflects the current state of the project.
Overall code layout
- app: Contains the main application code, including frontend and backend.
- app/backend: Contains the Python backend code, written with Quart framework.
- app/backend/approaches: Contains the different approaches
- app/backend/approaches/approach.py: Base class for all approaches
- app/backend/approaches/chatreadretrieveread.py: Chat approach, includes query rewriting step first
- app/backend/approaches/promptmanager.py: Manages loading and rendering of Jinja2 prompt templates
- app/backend/approaches/prompts/query_rewrite.system.jinja2: Jinja2 template used to rewrite the query based off search history into a better search query
- app/backend/approaches/prompts/chat_query_rewrite_tools.json: Tools used by the query rewriting prompt
- app/backend/approaches/prompts/chat_answer.system.jinja2: Jinja2 template for the system message used by the Chat approach to answer questions
- app/backend/approaches/prompts/chat_answer.user.jinja2: Jinja2 template for the user message used by the Chat approach, including sources
- app/backend/prepdocslib: Contains the document ingestion library used by both local and cloud ingestion
- app/backend/prepdocslib/blobmanager.py: Manages uploads to Azure Blob Storage
- app/backend/prepdocslib/cloudingestionstrategy.py: Builds the Azure AI Search indexer and skillset for the cloud ingestion pipeline
- app/backend/prepdocslib/csvparser.py: Parses CSV files
- app/backend/prepdocslib/embeddings.py: Generates embeddings for text and images using Azure OpenAI
- app/backend/prepdocslib/figureprocessor.py: Generates figure descriptions for both local ingestion and the cloud figure-processor skill
- app/backend/prepdocslib/fileprocessor.py: Orchestrates parsing and chunking of individual files
- app/backend/prepdocslib/filestrategy.py: Strategy for uploading and indexing files (local ingestion)
- app/backend/prepdocslib/htmlparser.py: Parses HTML files
- app/backend/prepdocslib/integratedvectorizerstrategy.py: Strategy using Azure AI Search integrated vectorization
- app/backend/prepdocslib/jsonparser.py: Parses JSON files
- app/backend/prepdocslib/listfilestrategy.py: Lists files from local filesystem or Azure Data Lake
- app/backend/prepdocslib/mediadescriber.py: Interfaces for describing images (Azure OpenAI GPT-4o, Content Understanding)
- app/backend/prepdocslib/page.py: Data classes for pages, images, and chunks
- app/backend/prepdocslib/parser.py: Base parser interface
- app/backend/prepdocslib/pdfparser.py: Parses PDFs using Azure Document Intelligence or local parser
- app/backend/prepdocslib/searchmanager.py: Manages Azure AI Search index creation and updates
- app/backend/prepdocslib/servicesetup.py: Shared service setup helpers for OpenAI, embeddings, blob storage, etc.
- app/backend/prepdocslib/strategy.py: Base strategy interface for document ingestion
- app/backend/prepdocslib/textparser.py: Parses plain text and markdown files
- app/backend/prepdocslib/textprocessor.py: Processes text chunks for cloud ingestion (merges figures, generates embeddings)
- app/backend/prepdocslib/textsplitter.py: Splits text into chunks using different strategies
- app/backend/app.py: The main entry point for the backend application.
- app/backend/approaches: Contains the different approaches
- app/functions: Azure Functions used for cloud ingestion custom skills (document extraction, figure processing, text processing). Each function bundles a synchronized copy of
prepdocslib; runpython scripts/copy_prepdocslib.pyto refresh the local copies if you modify the library. - app/frontend: Contains the React frontend code, built with TypeScript, built with vite.
- app/frontend/src/api: Contains the API client code for communicating with the backend.
- app/frontend/src/components: Contains the React components for the frontend.
- app/frontend/src/locales: Contains the translation files for internationalization.
- app/frontend/src/locales/da/translation.json: Danish translations
- app/frontend/src/locales/en/translation.json: English translations
- app/frontend/src/locales/es/translation.json: Spanish translations
- app/frontend/src/locales/fr/translation.json: French translations
- app/frontend/src/locales/it/translation.json: Italian translations
- app/frontend/src/locales/ja/translation.json: Japanese translations
- app/frontend/src/locales/nl/translation.json: Dutch translations
- app/frontend/src/locales/ptBR/translation.json: Portuguese translations
- app/frontend/src/locales/tr/translation.json: Turkish translations
- app/frontend/src/pages: Contains the main pages of the application
- app/backend: Contains the Python backend code, written with Quart framework.
- infra: Contains the Bicep templates for provisioning Azure resources.
- evals: Contains evaluation configs, datasets, and results.
- evals/results: Contains raw per-run eval output folders. Use descriptive setup-based names for repeated runs, such as
gpt54-low-top5-run1. - evals/results_summaries: Contains derived grouped summaries such as
baseline.jsonandbaseline.md. - evals/results_comparisons: Reserved for derived candidate-vs-baseline comparison artifacts.
- evals/eval_compare.py: Compares eval result folders and reports averages, confidence intervals, and paired significance tests.
- evals/results: Contains raw per-run eval output folders. Use descriptive setup-based names for repeated runs, such as
- tests: Contains the test code, including e2e tests, app integration tests, and unit tests.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 402 lines · 5,202 tokens per session scan A 8a07c8d52a94
azure-search-openai-demo AGENTS.md is an instructions file published in the GitHub repository Azure-Samples/azure-search-openai-demo (7,758 stars, last pushed 8d ago), licensed MIT. It adds 5,202 tokens to every session, about $0.0260 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.