How to Use AI to Personalize Presentations and Documents

At DealPage, we’re using LLMs like GPT-4 and Claud 3 to create personalized sales collateral at scale. Here’s how we do it and what we learned along the way.

For language models to generate quality content, they need information about your business as well as the customer. If you give the model bad data, it could make up facts (hallucinations) and create generic “AI” sounding content. The best results come from feeding the model a combination of previous examples (few shot prompting), and business context from internal documents. We believed that multi modality was important since a lot of sales content, like graphs and diagrams, were stored as images. These images could be used to answer questions or inserted as dynamic pzarts of personalized collateral.

Multi-Modal Content Library

Indexing

The first step involves the indexing of both documents and images. For basic text splitting, we use semantic chunk splitting, which attempts to keep paragraphs with similar meaning inside the same “chunk” of text. LangChain has an implementation of it here.

Images and tables were the next challenge we faced, as these were harder to extract and derive meaning out of. Luckily the gpt-4-vision model was released around the time we started work on this. For PDFs with images and tables, we extract them using Unstructured’s open source API and feed them to a model to generate a caption. This caption is what is embedded and used in the search index.

Embedding/Reranking

We initially used cross-encoder/ms-marco-MiniLM-L-6-v2 as a reranking model, before fine-tuning it on a synthetic dataset we created. This step of the search pipeline attempts to reorder the initial search results so that the most relevant ones are surfaced back to the model. We experimented with various combinations of embedding and reranking models, and finally settled with Nomic AI embeddings with our fine tuned reranker.Deal Context

Using the same approaches above, we pull data directly from your CRM like meeting notes, so that the model can tailor content to address specific concerns or pain points for each customer. By giving the model this info, as well as previous sales content and general business documents, we can personalize longer sections of documents, and even dynamically replace images.

Complex variable replacements

Most personalization tools today use basic variable mapping to insert content into decks and documents. We wanted to take this one step further by eliminating the need for manual mapping and adding image and rich text variables where the model could insert images from your library, or generate longer form content.

Variable Syntax

We use docxtemplater under the hood for variable replacement, which gives us a ton of flexibility with the generated content. Loops, images, rich text, and tables are all supported. This allows us to replace logos & diagrams, insert multi paragraph sections, and automatically generate order forms.

An example table loop variable for a quote table

The filled out table after AI finds line items in Salesforce

The end-to-end workflow

By combining different sources of context, along with a validated output schema, we can create entire proposals and decks from a template file. The amount of personalization is completely up to the end user, but LLMs have enabled new possibilities that previously required a lot of manual set up.

Whats next?

As the reasoning capabilities of these models get better, we will undoubtedly see new ways that they can help create sales content and suggest improvements to existing content. If you have any questions or would like to chat, let us know here!