Skip to content

icon picker
Overall System Prompt

Every time user ask a question (if AI receptionist is enabled) we expect openAI answer this question. To do it, we make a request to openAI with parameters like:
parameters: {
model: "gpt-4o-mini",
messages: our_context_here,
temperature: 0.75
}
But before we set this context in parameters, we need to build it somehow. To do it, we have special class called CollectMessages. The main purpose of it is create a solid context from pieces we want to have in the context. Currently we have these pieces:

1. Default instruction

We added it recently to set general rules for all AI receptionists. Now it looks like:
Answer all questions in a maximum of 2 sentences with enthusiasm.
Use a call-to-action only when it naturally fits the conversation or encourages a next step.
Avoid lists or long explanations unless I explicitly agree; if more detail is needed,
ask 'Want more details?' and if a list is relevant, ask 'Want a rundown'?

2. Personal prompt for AI receptionist

It's something we add in AI receptionist settings. We set it as it is without any additional instructions

3. System Date and Time

Simple prompt which say:
Current date/time: #{Time.current}

Time.current is a Ruby method to parse current timestamp. So when we have it in the context, openAI knows exactly what time is it now

4. Unknown context message

It's something we add in AI receptionist settings. We add it in the context like:
If you cannot answer, respond with #{unknown_context_message_prompt_we_added_in_settings}.

5. Sport club info

It's something we added on "My gym info" page Sent it to the context like
I will provide information about the sports clubs where the user is a member.
It will be an array with the corresponding data. It could be one or multiple sports clubs.
#{information_we_added_on_my_gym_info_page}

6. Training document context

It's a text information from attached documents, sent it like
I will provide additional information collected from the documents.
The information will be structured as an array of nested arrays.
Each nested array will contain two elements: the first element is a document description,
and the second element is the document content: #{text_info_from_all_attached_documents}"

7. Interaction history

Set last 20 messages from a current dialog to the context
So we just run through these 7 steps and get whole context as an output to use it in the request to OpenAI
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.