Find answers from the community

Updated last year

What is the difference between system

What is the difference between system and context prompt?
L
t
17 comments
I'm guessing this is about the CondensePlusContextChatEngine ?
So that chat engine works by inserting retrieved context into the system prompt

By default, the context prompt is

Plain Text
DEFAULT_CONTEXT_PROMPT_TEMPLATE = """
  The following is a friendly conversation between a user and an AI assistant.
  The assistant is talkative and provides lots of specific details from its context.
  If the assistant does not know the answer to a question, it truthfully says it
  does not know.

  Here are the relevant documents for the context:

  {context_str}

  Instruction: Based on the above documents, provide a detailed answer for the user question below.
  Answer "don't know" if not present in the document.
  """


This becomes the system prompt
So the context prompt is a template from which it constructs the system prompt?
And it changes on each message right?
That {context_str} changes on each message, the rest stays the same
What happens if I pass a system_prompt parameter instead? Will the context be lost as I overwrite it?
It's not used, so it will just get ignored
I've been going back and forth with supporting it or not, and what that would look like
But I think leaving a single context_prompt thing is probably the most simple
Thanks, good to know. Context prompt seems perfect for me as well. SO far I'm getting great results with this type of chatbot
@Logan M I notice that condence_plus_context however looses the context of the actual chat. If I say my name and then ask what's my name it doesn't know. Is that intended?
@toniuyt ha wow, there is a slight bug. let me patch that and release
Fixed it 😎
Attachment
image.png
Add a reply
Sign up and join the conversation on Discord