Skip to content
FacebookYouTubeX (Twitter)

Mix Multiple Knowledge Bases Outcomes

Sometimes a single Knowledge base is not enough. Some examples:

  • You indexed your PDFs or your website but you want to add more knowledge at runtime, without modifying or adding more PDFs, modifying original website pages etc.
  • You split your Knowledge base into more KBs for easy maintenance, but you want to query all your KBs all at once to find out the best answer from all of them
  • You uploaded your original contents but you want to fix some replies, improving the answer quality, without touching the original contents (PDFs, docs, website pages etc.)

There are a lot of ways to achieve the previous goals. But first of all, you will take advantage of Pingstreams’ ability to mix multiple Knowledge Bases in the same chatbot flow.

How to Mix Many KBs to Provide the Best Answers?

Section titled “How to Mix Many KBs to Provide the Best Answers?”

Use prompt engineering! In this article, we want to show you one elegant way to reach your “KBs mixing” goals using prompts with the Pingstreams Design Studio.

In Pingstreams, we have our Help Center that we indexed for live consulting through our chatbot:

Help Center Integration

You can ask everything you find in the Help Center to our chatbot. Our RAG engine will provide you the best available answer using the Knowledge base action filled up using the Pingstreams sitemap uploaded with the “sitemap” feature of the KB.

What happens when we want to add some additional content to our Help Center but without modifying or updating it?

You can simply add another Knowledge base action in the flow. In the new one you can add more FAQs, fix some replies by adding more info and/or use some external content that you don’t want to add to your online Help center (e.g., because of SEO policies) etc.

How can you query all of your KBs at once getting a simple, unique, comprehensive reply mixing the best of all your KBs? Use a super prompt!

Suppose that we want our chatbot to also reply to some prompt engineering questions, despite the fact that this course is not available in our Help Center. We can add all the course contents into a specific KB created for the purpose.

Multiple Knowledge Bases Setup

Now we want to get replies from both our KBs: Pingstreams Help Center and Prompt engineering course. Move to our designer. Put in chain the two KBs as in the following picture.

KB Chain Configuration

Knowledge Base Actions

There is no need to connect the Success and Else flows. When no connectors are set, the Actions are executed, the attributes populated (kb1 and kb2) and the flow continues upward → downward. When a connector is encountered, it will be automatically followed.

During the flow, kb1 attribute will be fulfilled with the reply eventually coming from the first KB query (Pingstreams), and kb2 with the reply from the second one (prompt engineering course). At this point, we have 2 attributes available, eventually populated with some content (depending on the user question asked during flow running).

Here is where the magic happens. Create a new block with the GPT Task, with the following prompt that will mix both replies, generating the best answer mixing kb1 and kb2 attributes:

GPT Task Configuration

This is the complete flow:

Complete Flow

Simply ask something targeted for the first or the second Knowledge base, and the prompt will do the magic of mixing the contents together.

When asked about Prompt engineering, the chatbot correctly gets the reply from the second KB (prompt engineering course):

Prompt Engineering Response

When asked about Pingstreams, the “Pingstreams” Knowledge Base replies accordingly:

Pingstreams Response

We also introduced a typo, just to show you how great LLMs are! 😊

This is the prompt we used:

Generate an answer to the user's question using the text contained between << >>
<<
{{kb1}}
{{kb2}}
>>
user's question: {{last_user_text}}

You can also use this method to mix whatever content you like. You can, for example:

  • Mix contents coming from multiple OpenAI Assistants
  • Mix Ask KB Actions with OpenAI Assistants
  • Combine with whatever new content actions will come in the future!

Benefits of Mixing Multiple Knowledge Bases

Section titled “Benefits of Mixing Multiple Knowledge Bases”

This approach offers several advantages:

  • Comprehensive Coverage: Access information from multiple specialized knowledge bases
  • Flexible Content Management: Add or update specific knowledge without affecting main documentation
  • Improved Accuracy: Combine different sources for more complete answers
  • Scalable Architecture: Easily add new knowledge bases as your needs grow
  • Content Separation: Keep different types of content organized and manageable

This technique is particularly useful for:

  • Multi-product support with separate product knowledge bases
  • Departmental knowledge combining different team expertise
  • Multilingual support with language-specific knowledge bases
  • Version control maintaining different versions of documentation
  • External integrations combining internal knowledge with external sources

This approach transforms your Pingstreams chatbot into a powerful information hub that can intelligently combine knowledge from multiple sources to provide comprehensive, accurate responses to user queries.

For more advanced configurations and examples, explore our community resources or contact our support team.