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/.github/instructions/bicep.instructions.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/bicep)<a href="https://agentmods.dev/instructions/azure-samples/azure-search-openai-demo/bicep"><img src="https://agentmods.dev/badge/instructions/azure-samples/azure-search-openai-demo/bicep/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/bicep"><img src="https://agentmods.dev/badge/instructions/azure-samples/azure-search-openai-demo/bicep.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.00749 | $0.00749 |
| Opus 5.5 | $0.00300 | $0.00300 |
| Sonnet 5.5 | $0.00150 | $0.00150 |
| Haiku 4.5 | $0.00075 | $0.00075 |
Grade A, and why
azure-search-openai-demo bicep.instructions.md scanned grade A with 0 findings 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 2mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 35 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bicep best-practices
This list of best-practices builds on top of information available at https://learn.microsoft.com/azure/azure-resource-manager/bicep. It provides a more opinionated and up-to-date set of rules for generating high-quality Bicep code. You should aim to follow these rules whenever generating or modifying Bicep code.
Rules
General
- Avoid setting the
namefield formodulestatements - it is no longer required. - If you need to input or output a set of logically-grouped values, generate a single
paramoroutputstatement with a User-defined type instead of emitting aparamoroutputstatement for each value. - If generating parameters, default to generating Bicep parameters files (
*.bicepparam), instead of ARM parameters files (*.json).
Resources
- Do not add references from child resources to parent resources by using
/characters in the child resourcenameproperty. Instead, use theparentproperty with a symbolic reference to the parent resource. - If you are generating a child resource type, sometimes this may require you to add an
existingresource for the parent if the parent is not already present in the file. - If you see diagnostic codes
BCP036,BCP037orBCP081, this may indicate you have hallucinated resource types or resource type properties. You may need to double-check against available resource type schema to tune your output. - Avoid using multiple
resourceId()functions andreference()function where possible. Instead use symbolic names to refer to ids or properties, creatingexistingresources if needed. For example, writefoo.idorfoo.properties.id, instead ofresourceId('...')orreference('...').id.
Types
- Avoid using open types such as
arrayorobjectwhen referencing types where possible (e.g. inoutputorparamstatements). Instead, use User-defined types to define a more precise type. - Use typed variables instead of untyped variables when exporting values with the
@export()decorator. For example, usevar foo string = 'blah'instead ofvar foo = bar. - When using User-defined types, aim to avoid repetition, and comment properties with
@description()where the context is unclear. - If you are passing data directly to or from a resource body via a
paramoroutputstatement, try to use existing Resource-derived types (resourceInput<'type@version'>andresourceOutput<'type@version'>) instead of writing User-defined types.
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.
- 2mo ago First seen · 35 lines · 749 tokens per session scan A 1477ecaa73ec
azure-search-openai-demo bicep.instructions.md is an instructions file published in the GitHub repository Azure-Samples/azure-search-openai-demo (7,803 stars, last pushed yesterday), licensed MIT. It adds 749 tokens to every session, about $0.0030 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
azure-search-openai-demo bicep.instructions.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| azure-search-openai-demo bicep.instructions.mdAzure-Samples/azure-search-openai-demo | Instructions file | 7.8k | yesterday | MIT | A | 749 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |