LLMOpsThe LLMOps lifecycle · MLflow 3 · FastAPI · Docker · AWS/Azure
Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
50 small wins to finish your pathNext lesson →

The knowledge base: rules into Azure AI Search

The rules become a knowledge base the auditor can search: the FTC PDFs are loaded, split into chunks, embedded with text-embedding-3-small, and stored as vectors in Azure AI Search. It is the RAG data pipeline from earlier in the course, built for real on a cloud vector store.

Last updated: 15 Oct, 2026 · LLMOps

The RAG data pipeline walked this chain in the abstract: ingest, parse, split, chunk, embed, store, retrieve. Here it is the same chain, applied to the FTC rule documents, with Azure AI Search as the store.

Loading, chunking and embedding the rules · from the End to End Multimodal LLMOps Project video · 3:10:00 to 3:13:00

From PDF to vectors

python
from langchain_community.document_loaders import PyPDFLoader
from langchain_text_splitters import RecursiveCharacterTextSplitter

# the two FTC rule PDFs are loaded page by page
loader = PyPDFLoader("data/ftc-influencer-guidelines.pdf")
raw_docs = loader.load()

# split into overlapping chunks so a rule is not cut in half at a boundary
splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
chunks = splitter.split_documents(raw_docs)

The chunk size is 1,000 characters with a 200-character overlap, the settings the video uses. The overlap is why a rule that straddles two chunks still appears whole in at least one of them.

python
from langchain_openai import AzureOpenAIEmbeddings
from langchain_community.vectorstores.azuresearch import AzureSearch

# the same embedding model the auditor's queries will use, so query and document match
embeddings = AzureOpenAIEmbeddings(azure_deployment="text-embedding-3-small")

store = AzureSearch(
    azure_search_endpoint=AZURE_SEARCH_ENDPOINT,
    azure_search_key=AZURE_SEARCH_API_KEY,
    index_name="brand-compliance-rules",
    embedding_function=embeddings.embed_query,
)
store.add_documents(chunks)   # the rules are now searchable by meaning
The rules knowledge base pipeline, left to right: two FTC PDFs, loaded page by page with PyPDFLoader, split into 1000-character chunks with 200 overlap, embedded with Azure text-embedding-3-small, and written into an Azure AI Search vector index. A note says the auditor later embeds its query with the same model so query and rule compare.

The ops view

  • The embedding model is part of the index. The auditor's query must be embedded with the same text-embedding-3-small, or the vectors do not compare. Swapping it means re-embedding every rule.
  • Re-indexing is a job, not a request. New guidance means loading, chunking and embedding again; it runs when the rules change, not on every audit.
  • What you version is the chunks and their vectors, alongside the chunk settings, so an audit can be reproduced against the exact rules that were live.
Watch out. This writes to a billed Azure AI Search index and calls a paid embedding model, so it is shown rather than run. The keyless version of this chain, on a local store, is Building a RAG pipeline.
Try it yourself
  • Explain why a 200-character overlap helps when a single FTC rule is longer than one chunk.
  • Say what has to be re-run if the FTC updates one of the two PDFs.

Slow is fine. Stopping is the only problem.