kernel-memory icon indicating copy to clipboard operation
kernel-memory copied to clipboard

[Question] How to use a kernel memory plugin with other plugins?

Open rborosak opened this issue 2 months ago • 1 comments

Context / Scenario

Hi, I was able to implement a memory kernel plugin. The idea is to have a chatbot that answers only to questions from internal documents. If the user ask something that is not related to our documents the bot replies "I don't know".

I have registered the memory plugin and my prompt looks something like this. My project is based on this blog entry https://www.developerscantina.com/p/semantic-kernel-memory/

var prompt = $@" Question to Kernel Memory: {question}

Kernel Memory Answer: {{memory.ask}}

If the answer is empty say 'I don't know', otherwise reply with the answer. ";

This works as expected.

Now I would like to add a new plugin so the users can book an appointment. I have registered this new plugin but when the user asks something like "How can I make an appointment" or "I would like to make an appointment" the answer is "I don't know" because it was not found in memory.

Question

How should I change my prompt so that the bot can answer ONLY questions based on our internal documents and still use another plugin (and check if all the input arguments are provided by the user like time, date, place for the appointment)?

Can this be done in a single project or do I need to have two chatbot?

rborosak avatar Apr 21 '24 22:04 rborosak