Azure AI Foundry integration with LangChain/LangGraph.
Tools provided by Azure AI Foundry.
Embedding model for Azure AI.
Document loaders provided by Azure AI Foundry.
Callables for Azure AI.
Agents integrated with LangChain and LangGraph.
Azure Foundry evaluation utilities for LangGraph agents.
This module provides wrappers around Azure Foundry's built-in agent evaluators and helpers for building evaluator-optimizer subgraphs in LangGraph workflows.
.. code-block:: python
from langchain_azure_ai.evaluation import (
FoundryEvaluator,
FoundryEvaluatorSuite,
FoundryEvalResult,
messages_to_foundry_format,
tool_schemas_to_foundry_format,
create_eval_optimize_subgraph,
create_analyst_subgraph,
)
Chat completions model for Azure AI.
This module defines the query constructors for the Azure AI integrations.
Chat message history stores a history of the message interactions in a chat.
Class hierarchy:
BaseChatMessageHistory --> <name>ChatMessageHistory # Examples: CosmosDBChatMessageHistory
Main helpers:
AIMessage, HumanMessage, BaseMessage
Vector store stores embedded data and performs vector search.
One of the most common ways to store and search over unstructured data is to embed it and store the resulting embedding vectors, and then query the store and retrieve the data that are 'most similar' to the embedded query.
Class hierarchy:
VectorStore --> <name> # Examples: AzureSearch, FAISS, Milvus
BaseRetriever --> VectorStoreRetriever --> <name>Retriever # Example: AzureAISearchRetriever
Main helpers:
Embeddings, Document
Retrievers provide an interface to search and retrieve relevant documents from a data source.
Retrievers abstract the logic of querying underlying data stores (such as vector stores, search engines, or databases) and returning documents most relevant to a user's query. They are commonly used to power search, question answering, and RAG (Retrieval-Augmented Generation) workflows.
Class hierarchy:
BaseRetriever --> VectorStoreRetriever --> <name>Retriever # Example: AzureAISearchRetriever
Main helpers:
Document, Query