The Core Concept: Joining Structured and Unstructured Data
Structured data—your standard rows and columns—makes up maybe 20% of what a company knows. The other 80% is unstructured. Think documents, PDFs, images, diagrams, web pages, call transcripts, and emails.
Intelligent Context is the layer inside Data Cloud that brings unstructured content in and makes it usable by AI agents and automated workflows. It connects directly to where your files already live, such as Amazon S3, Azure, Google Drive, or SharePoint.
Once connected, it runs a specialized pipeline:
- Chunking: The content is broken down into small, logical pieces (chunks).
- Embedding: Each chunk is converted into an
embedding—a complex list of numbers that represents its underlying meaning. - Indexing: These chunks are stored in a vector database so they can be searched rapidly based on similarity.
- Retrieving: When a user asks a question, a retriever pulls the most relevant chunks and feeds them into the AI's prompt.
This entire process is known as Retrieval-Augmented Generation (RAG), and Intelligent Context is where it lives natively inside Data Cloud.
The magic happens when you join the two worlds. An agent can combine a structured fact with an unstructured one to generate a single, highly personalized answer. For example: The agent sees the customer is on the Gold plan (structured CRM data), AND it reads that Gold terms exclude water damage according to page 14 of the contract (unstructured data). Neither piece of data alone answers the question. The combination is what transforms a basic chatbot into a genuinely helpful AI agent.
- Rule: Structured data tells you who. Unstructured tells you what they were promised.
- Gain: Contracts, PDFs, and call notes become searchable facts an agent can answer from.
- Price: You have a document pipeline to run. Chunking, embedding, and indexing require ongoing maintenance, not just a one-time load.
- Limits: Connect the document store, then the platform processes it. Grounding runs in a user context, meaning permissions still dictate what the agent is allowed to read.
- The Old Way (Mirroring): Attaching a PDF directly to a record. The file is there for a human to open, but nothing is searchable, and it cannot ground an AI answer.
- At Volume: Roughly 80% of enterprise knowledge sits in documents, not fields. Size the value of this feature based on the client's actual document volume.
Core Q&A: Designing for the Real World
Q: Your agent needs to answer contract questions, but the answers only exist in raw PDFs. How do you design this architecture?
A: The PDFs need to be transformed from static attachments into searchable knowledge.
- First, connect your external document store (S3, SharePoint, etc.) to Data Cloud via Intelligent Context. The system ingests, chunks, embeds, and indexes the files.
- When a user asks a question, a retriever fetches the chunks that conceptually match the prompt.
- The prompt template feeds those specific chunks to the Large Language Model (LLM).
- The agent answers directly from the contract text and cites the source document and section so a human can verify it.
- Crucially, the retriever is scoped to THAT specific customer's contract, not the entire database.
- The model is strictly instructed to answer only from the retrieved text, and to say "I don't know" if the text doesn't contain the answer.
- Finally, the structured data (their plan type, claim history) is joined with the unstructured chunk to provide a complete answer.
Common Traps & Follow-Up Questions
Q1: How do you stop the AI agent from reading a document that this specific customer shouldn't have access to?
A: You secure it exactly the same way you secure structured records: through hard permissions and scoping, not through prompt engineering.
Never rely on an instruction like "Only look at this user's contract" inside the LLM prompt. The model might ignore it, or a user could use a prompt injection attack to bypass it. Security filters belong in the retriever and the platform's permission model. That is the difference between an actual control and a hope.
- Grounding always runs in the context of the user asking the question. Source data permissions still apply.
- The retriever must be scoped. It should be explicitly filtered to query only the documents linked to the current customer or account.
Q2: Why is "chunking" a document harder than it sounds?
A: Because real business documents have complex structures, and naive chunking destroys that context.
- If you cut a document based purely on a fixed character count (e.g., every 500 characters), you will inevitably split important clauses in half.
- A retrieved chunk might say "shall not apply" but the chunk before it—which explains exactly what doesn't apply—is left behind.
- Worse, a modifier like "this exclusion does not apply to Gold customers" gets separated from the core rule. The agent will then confidently state the exact opposite of the truth.
The Solution: You must chunk based on the document's natural structure. Chunk by clause, section, or heading. Maintain a small overlap between chunks so boundary sentences aren't orphaned. Carry metadata (document name, section number) with every chunk so the AI can cite its sources.
Q3: How do we actually know if our chunking and retrieval strategy is working?
A: Chunking is an empirical science, not a guessing game. You test it by asking real, complex business questions and manually reading the raw chunks that the retriever brings back. If the retrieved chunks don't contain the answer, the LLM will fail. Fix the retriever and chunking strategy first before trying to fix the prompt.
Key Takeaways
- Intelligent Context is Salesforce's native engine for turning unstructured files into vector embeddings.
- It enables RAG (Retrieval-Augmented Generation) so agents can answer questions based on your company's actual documents.
- Combining unstructured document data with structured CRM data is the key to highly accurate, personalized AI responses.
- Always respect document structure when chunking, and never rely on LLM prompts to enforce data security.