← All articles
8 min read

Pega Knowledge Buddy Explained: How RAG Answers a Home Loan Policy Question

AI, GenAI & AgentsPegaKnowledge BuddyRAGPega GenAIBankingVector Store

Pega Knowledge Buddy Explained: How RAG Answers a Home Loan Policy Question

A customer is on the phone. Another lender has offered a lower rate. Can the bank match it, and waive the application fee? The home loan specialist does not answer from memory. They check the current policy first. In this post, let's understand how Pega Knowledge Buddy makes that check take seconds, and what has to be true behind the scenes.

The bank, the policy and every figure here are invented for this example. The Pega screens are reference screens, there to show where each setting lives. I have not built this on my own system for this post, so check each setting against your own build.

The problem: a general model does not know your policy

A general AI model knows banking in general. It does not know this bank's policy.

The answer lives in one document: the Home Lending Pricing Exception Policy, version 4.2, effective 1 November. It replaces version 4.1. It holds the discount authority for each role, the fee waiver reason codes, and a checklist of what to record before you tell the customer anything.

A keyword search finds version 4.1, version 4.2 and three old emails. Which one is current?

Hook art for the Pega Knowledge Buddy explainer.

What RAG is

RAG stands for retrieval augmented generation. Find the right pieces of your own content first. Then let the model write the answer from those pieces.

It is two flows. A write path, done once and again on every policy change. And a read path, run on every question.

The write path: two ways in

There are two ways to get content into a Buddy. Both end in the same place.

The Pega Knowledge portal. The policy owner already works here. They add a content type, such as Home Lending Policy, with the categories it may use. A category carries a role. They attach the policy file, approve it and publish. Publishing ingests it automatically.

The Buddy portal. Choose Create, then Content. Pick a collection, then a data source. Add an access role. Then add the content as text, or attach a file such as a PDF or a Word document.

A reference screen of the Create Content dialog, with collection, data source and access role fields.

Two rules matter here.

  1. Every item needs at least one role. The role says who may read it.
  2. A Buddy only answers from data sources it has been given. Add the new data source to the Buddy, then test it with Preview Buddy.

Other routes exist. Sync all ingests every published item again, for example after a build upgrade. There is also an ingestion API, and a Knowledge Loader for SharePoint and Confluence.

Chunk, embed, store

Now the part you cannot see.

Chunk. A model cannot search a whole manual, so Pega cuts the text into pieces. The default is 1000 characters with 200 characters of overlap. In the Buddy portal, you set this as the chunking method under Advanced settings.

The overlap matters. It stops a rule being cut in half at the edge of a chunk. A numbered checklist split mid-list gives a half-true answer.

There are other methods. Title puts the document title on every chunk, so each piece still knows which policy it came from. None means you chunk the text yourself.

These settings sit on the data collection, and a data source can override them. A collection is a container for data sources. A search cannot span collections, so keep content that belongs together in one.

Embed. Each chunk goes through the Pega GenAI gateway and becomes a list of numbers that captures its meaning.

Store. Those numbers are saved in the Pega GenAI vector store. Filed by meaning, not by keyword.

You cannot see the embeddings, the gateway or the store. You can see the settings, the prompt and the history. I did not find an embedding model named in the documentation, so I do not name one.

The Buddy inside the case

On the specialist's side, the Buddy sits in the work view. In Constellation, the builder opens the Control Panel, then Interactions, Knowledge and the Knowledge Management Widget. They tick Enable Knowledge Buddy and name the default Buddy. Leave the name blank, and there is no response.

Next, add the Knowledge widget to the case view, with the context type set to Case. That passes the case ID to the Buddy.

One limit. The documentation says the widget passes the case ID. It does not say how the Buddy uses that in its answer, so I do not claim it. The Pega guide for this setup is written for version 24.1, so check it against your own build.

The read path: retrieve, prompt, answer

This is what happens when the specialist asks.

  1. The question. Can we match this rate and waive the fee?
  2. Embed it. The question becomes numbers too, and the model that does it has to match the one used on the chunks.
  3. Vector search. The store returns the chunks closest in meaning to the question, not the ones that share the same words.
  4. The closest chunks. Three settings control this: up to five chunks, up to five thousand characters in total, and a minimum similarity of 80. Raise the similarity for strict policy answers, and expect more answers of "I do not know".
  5. One prompt. The instructions, the information paragraph, the chunks and the question go to the model together, with the user's role information.
  6. The answer. You can ask for the source and the similarity score to appear with it.

A reference screen of a Buddy's details, with the instructions and guardrails that form the prompt.

"Answer only from the context. Say when you are unsure. Cite the policy section." Those are instructions you write. They are not a built-in engine rule.

A reference screen of an answer shown with its source and similarity score.

To check any answer, open Execution history. The Chunks tab shows what was retrieved. The Prompt tab shows exactly what the model was sent.

A reference screen of an execution history case with the question, the answer and the Chunks and Prompt tabs.

Same question, three audiences

The home loan specialist asks. The Buddy says the request is above their authority band, names the next step, which is to escalate to a sales manager, and cites version 4.2.

The sales manager asks the same question. Their role can read the manager authority band and the pre-contact checklist: what to record and confirm before telling the customer anything.

A customer-safe view gets neither. Only the public pricing content.

So the answer is tailored to the user's access. The documentation does not spell out where that filtering happens, so I do not claim how.

Each Buddy also has its own security, with three access types: Manage, View and Use. Use decides who may ask the Buddy questions, and it does not grant access to the portal.

A reference screen of the Buddy security settings with the Manage and Use access types, each with a role.

Then the missing policy. The manager asks about a product line nobody ingested. Nothing close enough comes back, and with Must return results on, the Buddy says: I do not know the answer. A guess there is the real failure.

Keep it true

The risk that matters most is keeping the content true.

Version 4.1 is still in the store. If nobody re-ingested or withdrew it, the Buddy can retrieve the old authority band. That is a compliance problem, not a typo.

The loop is simple. The policy owner revises the policy to version 4.2, publishes again and withdraws the old version. Then the specialist asks again.

There is no retraining. Update the content, re-ingest it and retest in Preview Buddy. The documentation also describes feedback: a thumbs down notifies the product owner, and a Recommendations tab suggests fixes.

Before you build one

  • Check the settings on your own version. The documentation I read is tagged 24.1 to '25. I found nothing for '26.
  • Do not assume Community Edition. I could not confirm from an official page whether Knowledge Buddy is available there, so I make no claim either way.
  • Know the limit. The Buddy cannot answer questions about images or videos.
  • Name the roles first. Every item needs one, and the role is what decides who sees the answer.

What is real and what is invented

The bank, the policy, the version numbers, the authority bands and the specialist's scenario are invented. The settings and behaviours described come from Pega's documentation, and the screens are reference screens.

Takeaway

It answers from what you gave it, to who may see it. Keep it current. Say when it is missing.

More explainers at ssmone.cloud.