Ground chat completions on Azure AI Search without Data source
This example pipeline demonstrates the workaround described in the Azure AI Foundry Chat Completions Snap's Known Issues for grounding a response on an Azure AI Search index now that Data source configurations no longer work.
Before you run this pipeline
Selecting your own accounts is not enough to run this pipeline — it also requires the following pipeline parameters and Snap field values, and two expressions that assume the sample hotels-sample-index schema.
| Pipeline parameter | Description |
|---|---|
question |
The question to answer. Defaults to Which hotel has a bowling alley? |
searchService |
Required. The Azure AI Search service name — the part before .search.windows.net. |
indexName |
Required. The Azure AI Search index name. |
On the Azure AI Foundry Chat Completions Snap, set Deployment ID to your own chat deployment. This is a Snap field, not a pipeline parameter.
Two expressions reference the sample index's HotelName and
Description fields. Replace them with your own index's field names:
- On the
HTTP Client
Snap, the Raw
entity field's
selectvalue, "HotelName, Description", lists the index fields to return. - On the Mapper Snap, the expression
$entity.value.map(d => d.HotelName + ": " + d.Description).join("\n\n")builds one paragraph per passage from those same fields.
- Download and import the SLP file into your Environment.
- Configure Snap accounts.
- Provide Pipeline parameters, if any.