- Implementation of specialist execution api, including SSE protocol
- eveai_chat becomes deprecated and should be replaced with SSE - Adaptation of STANDARD_RAG specialist - Base class definition allowing to realise specialists with crewai framework - Implementation of SPIN_SPECIALIST - Implementation of test app for testing specialists (test_specialist_client). Also serves as an example for future SSE-based client - Improvements to startup scripts to better handle and scale multiple connections - Small improvements to the interaction forms and views - Caching implementation improved and augmented with additional caches
This commit is contained in:
@@ -3,13 +3,18 @@ name: "Identification Agent"
|
||||
role: >
|
||||
Identification Administrative force. {custom_role}
|
||||
goal: >
|
||||
You are an administrative force that tries to gather identification information of an end-user through conversation.
|
||||
You are an administrative force that tries to gather identification information to complete the administration of an
|
||||
end-user, the company he or she works for, through monitoring conversations and advising on questions to help you do
|
||||
your job. You are responsible for completing the company's backend systems (like CRM, ERP, ...) with inputs from the
|
||||
end user in the conversation.
|
||||
{custom_goal}
|
||||
backstory: >
|
||||
You are and administrative force for {company}. Your task is to identify the person in a conversation, so he or she
|
||||
can easily be contacted later on. {custom_backstory}
|
||||
You are and administrative force for {company}, and very proficient in gathering information for the company's backend
|
||||
systems. You do so by monitoring conversations between one of your colleagues (e.g. sales, finance, support, ...) and
|
||||
an end user. You ask your colleagues to request additional information to complete your task.
|
||||
{custom_backstory}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2025-01-08"
|
||||
description: "An Agent that gathers identification information"
|
||||
description: "An Agent that gathers administrative information"
|
||||
changes: "Initial version"
|
||||
|
||||
21
config/agents/RAG_COMMUNICATION_AGENT/1.0.0.yaml
Normal file
21
config/agents/RAG_COMMUNICATION_AGENT/1.0.0.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: "1.0.0"
|
||||
name: "Rag Communication Agent"
|
||||
role: >
|
||||
{company} Interaction Responsible. {custom_role}
|
||||
goal: >
|
||||
Your team has collected answers to a question asked. But it also created some additional questions to be asked. You
|
||||
ensure the necessary answers are returned, and make an informed selection of the additional questions that can be
|
||||
asked (combining them when appropriate), ensuring the human you're communicating to does not get overwhelmed.
|
||||
{custom_goal}
|
||||
backstory: >
|
||||
You are the online communication expert for {company}. You handled a lot of online communications with both customers
|
||||
and internal employees. You are a master in redacting one coherent reply in a conversation that includes all the
|
||||
answers, and a selection of additional questions to be asked in a conversation. Although your backoffice team might
|
||||
want to ask a myriad of questions, you understand that doesn't fit with the way humans communicate. You know how to
|
||||
combine multiple related questions, and understand how to interweave the questions in the answers when related.
|
||||
{custom_backstory}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2025-01-08"
|
||||
description: "An Agent that consolidates both answers and questions in a consistent reply"
|
||||
changes: "Initial version"
|
||||
@@ -10,10 +10,10 @@ backstory: >
|
||||
trained to understand an analyse ongoing conversations. Your are proficient in detecting SPIN-related information in a
|
||||
conversation.
|
||||
SPIN stands for:
|
||||
- Situation questions & information - Understanding the customer's current context
|
||||
- Problem questions & information - Uncovering challenges and pain points
|
||||
- Implication questions & information - Exploring consequences of those problems
|
||||
- Need-payoff questions & information - Helping customers realize value of solutions
|
||||
- Situation information - Understanding the customer's current context
|
||||
- Problem information - Uncovering challenges and pain points
|
||||
- Implication information - Exploring consequences of those problems
|
||||
- Need-payoff information - Helping customers realize value of solutions
|
||||
{custom_backstory}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
|
||||
@@ -11,10 +11,10 @@ backstory: >
|
||||
decide on follow-up questions for more in-depth information to ensure we get the required information that may lead to
|
||||
selling {products}.
|
||||
SPIN stands for:
|
||||
- Situation questions & information - Understanding the customer's current context
|
||||
- Problem questions & information - Uncovering challenges and pain points
|
||||
- Implication questions & information - Exploring consequences of those problems
|
||||
- Need-payoff questions & information - Helping customers realize value of solutions
|
||||
- Situation information - Understanding the customer's current context
|
||||
- Problem information - Uncovering challenges and pain points
|
||||
- Implication information - Exploring consequences of those problems
|
||||
- Need-payoff information - Helping customers realize value of solutions
|
||||
{custom_backstory}
|
||||
You are acquainted with the following product information:
|
||||
{product_information}
|
||||
|
||||
@@ -197,6 +197,8 @@ class DevConfig(Config):
|
||||
CELERY_RESULT_BACKEND_CHAT = f'{REDIS_BASE_URI}/3'
|
||||
# eveai_chat_workers cache Redis Settings
|
||||
CHAT_WORKER_CACHE_URL = f'{REDIS_BASE_URI}/4'
|
||||
# specialist execution pub/sub Redis Settings
|
||||
SPECIALIST_EXEC_PUBSUB = f'{REDIS_BASE_URI}/5'
|
||||
|
||||
|
||||
# Unstructured settings
|
||||
@@ -290,6 +292,8 @@ class ProdConfig(Config):
|
||||
CELERY_RESULT_BACKEND_CHAT = f'{REDIS_BASE_URI}/3'
|
||||
# eveai_chat_workers cache Redis Settings
|
||||
CHAT_WORKER_CACHE_URL = f'{REDIS_BASE_URI}/4'
|
||||
# specialist execution pub/sub Redis Settings
|
||||
SPECIALIST_EXEC_PUBSUB = f'{REDIS_BASE_URI}/5'
|
||||
|
||||
# Session settings
|
||||
SESSION_REDIS = redis.from_url(f'{REDIS_BASE_URI}/2')
|
||||
|
||||
12
config/prompts/encyclopedia/1.0.0.yaml
Normal file
12
config/prompts/encyclopedia/1.0.0.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "1.0.0"
|
||||
content: |
|
||||
You have a lot of background knowledge, and as such you are some kind of
|
||||
'encyclopedia' to explain general terminology. Only answer if you have a clear understanding of the question.
|
||||
If not, say you do not have sufficient information to answer the question. Use the {language} in your communication.
|
||||
Question:
|
||||
{question}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2024-11-10"
|
||||
description: "A background information retriever for Evie"
|
||||
changes: "Initial version migrated from flat file structure"
|
||||
16
config/prompts/history/1.0.0.yaml
Normal file
16
config/prompts/history/1.0.0.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: "1.0.0"
|
||||
content: |
|
||||
You are a helpful assistant that details a question based on a previous context,
|
||||
in such a way that the question is understandable without the previous context.
|
||||
The context is a conversation history, with the HUMAN asking questions, the AI answering questions.
|
||||
The history is delimited between triple backquotes.
|
||||
You answer by stating the question in {language}.
|
||||
History:
|
||||
```{history}```
|
||||
Question to be detailed:
|
||||
{question}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2024-11-10"
|
||||
description: "Prompt to further detail a question based on the previous conversation"
|
||||
changes: "Initial version migrated from flat file structure"
|
||||
20
config/prompts/html_parse/1.0.0.yaml
Normal file
20
config/prompts/html_parse/1.0.0.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
version: "1.0.0"
|
||||
content: |
|
||||
You are a top administrative assistant specialized in transforming given HTML into markdown formatted files. The generated files will be used to generate embeddings in a RAG-system.
|
||||
|
||||
# Best practices are:
|
||||
- Respect wordings and language(s) used in the HTML.
|
||||
- The following items need to be considered: headings, paragraphs, listed items (numbered or not) and tables. Images can be neglected.
|
||||
- Sub-headers can be used as lists. This is true when a header is followed by a series of sub-headers without content (paragraphs or listed items). Present those sub-headers as a list.
|
||||
- Be careful of encoding of the text. Everything needs to be human readable.
|
||||
|
||||
Process the file carefully, and take a stepped approach. The resulting markdown should be the result of the processing of the complete input html file. Answer with the pure markdown, without any other text.
|
||||
|
||||
HTML is between triple backquotes.
|
||||
|
||||
```{html}```
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2024-11-10"
|
||||
description: "An aid in transforming HTML-based inputs to markdown"
|
||||
changes: "Initial version migrated from flat file structure"
|
||||
23
config/prompts/pdf_parse/1.0.0.yaml
Normal file
23
config/prompts/pdf_parse/1.0.0.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: "1.0.0"
|
||||
content: |
|
||||
You are a top administrative aid specialized in transforming given PDF-files into markdown formatted files. The generated files will be used to generate embeddings in a RAG-system.
|
||||
The content you get is already processed (some markdown already generated), but needs to be corrected. For large files, you may receive only portions of the full file. Consider this when processing the content.
|
||||
|
||||
# Best practices are:
|
||||
- Respect wordings and language(s) used in the provided content.
|
||||
- The following items need to be considered: headings, paragraphs, listed items (numbered or not) and tables. Images can be neglected.
|
||||
- When headings are numbered, show the numbering and define the header level. You may have to correct current header levels, as preprocessing is known to make errors.
|
||||
- A new item is started when a <return> is found before a full line is reached. In order to know the number of characters in a line, please check the document and the context within the document (e.g. an image could limit the number of characters temporarily).
|
||||
- Paragraphs are to be stripped of newlines so they become easily readable.
|
||||
- Be careful of encoding of the text. Everything needs to be human readable.
|
||||
|
||||
Process the file carefully, and take a stepped approach. The resulting markdown should be the result of the processing of the complete input pdf content. Answer with the pure markdown, without any other text.
|
||||
|
||||
PDF content is between triple backquotes.
|
||||
|
||||
```{pdf_content}```
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2024-11-10"
|
||||
description: "An assistant to parse PDF-content into markdown"
|
||||
changes: "Initial version migrated from flat file structure"
|
||||
15
config/prompts/rag/1.0.0.yaml
Normal file
15
config/prompts/rag/1.0.0.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
version: "1.0.0"
|
||||
content: |
|
||||
Answer the question based on the following context, delimited between triple backquotes.
|
||||
{tenant_context}
|
||||
Use the following {language} in your communication, and cite the sources used at the end of the full conversation.
|
||||
If the question cannot be answered using the given context, say "I have insufficient information to answer this question."
|
||||
Context:
|
||||
```{context}```
|
||||
Question:
|
||||
{question}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2024-11-10"
|
||||
description: "The Main RAG retriever"
|
||||
changes: "Initial version migrated from flat file structure"
|
||||
9
config/prompts/summary/1.0.0.yaml
Normal file
9
config/prompts/summary/1.0.0.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
version: "1.0.0"
|
||||
content: |
|
||||
Write a concise summary of the text in {language}. The text is delimited between triple backquotes.
|
||||
```{text}```
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2024-11-10"
|
||||
description: "An assistant to create a summary when multiple chunks are required for 1 file"
|
||||
changes: "Initial version migrated from flat file structure"
|
||||
25
config/prompts/transcript/1.0.0.yaml
Normal file
25
config/prompts/transcript/1.0.0.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
version: "1.0.0"
|
||||
content: |
|
||||
You are a top administrative assistant specialized in transforming given transcriptions into markdown formatted files. The generated files will be used to generate embeddings in a RAG-system. The transcriptions originate from podcast, videos and similar material.
|
||||
You may receive information in different chunks. If you're not receiving the first chunk, you'll get the last part of the previous chunk, including it's title in between triple $. Consider this last part and the title as the start of the new chunk.
|
||||
|
||||
|
||||
# Best practices and steps are:
|
||||
- Respect wordings and language(s) used in the transcription. Main language is {language}.
|
||||
- Sometimes, the transcript contains speech of several people participating in a conversation. Although these are not obvious from reading the file, try to detect when other people are speaking.
|
||||
- Divide the transcript into several logical parts. Ensure questions and their answers are in the same logical part. Don't make logical parts too small. They should contain at least 7 or 8 sentences.
|
||||
- annotate the text to identify these logical parts using headings in {language}.
|
||||
- improve errors in the transcript given the context, but do not change the meaning and intentions of the transcription.
|
||||
|
||||
Process the file carefully, and take a stepped approach. The resulting markdown should be the result of processing the complete input transcription. Answer with the pure markdown, without any other text.
|
||||
|
||||
The transcript is between triple backquotes.
|
||||
|
||||
$$${previous_part}$$$
|
||||
|
||||
```{transcript}```
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2024-11-10"
|
||||
description: "An assistant to transform a transcript to markdown."
|
||||
changes: "Initial version migrated from flat file structure"
|
||||
26
config/retrievers/STANDARD_RAG/1.0.0.yaml
Normal file
26
config/retrievers/STANDARD_RAG/1.0.0.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
version: "1.0.0"
|
||||
name: "Standard RAG Retriever"
|
||||
configuration:
|
||||
es_k:
|
||||
name: "es_k"
|
||||
type: "int"
|
||||
description: "K-value to retrieve embeddings (max embeddings retrieved)"
|
||||
required: true
|
||||
default: 8
|
||||
es_similarity_threshold:
|
||||
name: "es_similarity_threshold"
|
||||
type: "float"
|
||||
description: "Similarity threshold for retrieving embeddings"
|
||||
required: true
|
||||
default: 0.3
|
||||
arguments:
|
||||
query:
|
||||
name: "query"
|
||||
type: "str"
|
||||
description: "Query to retrieve embeddings"
|
||||
required: True
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2025-01-24"
|
||||
changes: "Initial version"
|
||||
description: "Retrieving all embeddings conform the query"
|
||||
@@ -1,4 +1,4 @@
|
||||
version: 1.0.0
|
||||
version: "1.0.0"
|
||||
name: "Spin Sales Specialist"
|
||||
framework: "crewai"
|
||||
configuration:
|
||||
@@ -31,6 +31,12 @@ configuration:
|
||||
type: "str"
|
||||
description: "The language code used for internal information. If not provided, the tenant's default language will be used"
|
||||
required: false
|
||||
nr_of_questions:
|
||||
name: "nr_of_questions"
|
||||
type: "int"
|
||||
description: "The maximum number of questions to formulate extra questions"
|
||||
required: true
|
||||
default: 3
|
||||
arguments:
|
||||
language:
|
||||
name: "Language"
|
||||
@@ -48,61 +54,113 @@ arguments:
|
||||
description: "Initial identification information when available"
|
||||
required: false
|
||||
results:
|
||||
detailed_query:
|
||||
name: "detailed_query"
|
||||
type: "str"
|
||||
description: "The query detailed with the Chat Session History."
|
||||
required: true
|
||||
answer:
|
||||
name: "answer"
|
||||
type: "str"
|
||||
description: "Answer to the query"
|
||||
required: true
|
||||
citations:
|
||||
name: "citations"
|
||||
type: "List[str]"
|
||||
description: "List of citations"
|
||||
required: false
|
||||
insufficient_info:
|
||||
name: "insufficient_info"
|
||||
type: "bool"
|
||||
description: "Whether or not the query is insufficient info"
|
||||
required: true
|
||||
rag_output:
|
||||
answer:
|
||||
name: "answer"
|
||||
type: "str"
|
||||
description: "Answer to the query"
|
||||
required: true
|
||||
citations:
|
||||
name: "citations"
|
||||
type: "List[str]"
|
||||
description: "List of citations"
|
||||
required: false
|
||||
insufficient_info:
|
||||
name: "insufficient_info"
|
||||
type: "bool"
|
||||
description: "Whether or not the query is insufficient info"
|
||||
required: true
|
||||
spin:
|
||||
situation_information:
|
||||
name: "situation_information"
|
||||
type: "List[str]"
|
||||
description: "A list of situation descriptions"
|
||||
situation:
|
||||
name: "situation"
|
||||
type: "str"
|
||||
description: "A description of the customer's current situation / context"
|
||||
required: false
|
||||
problem_information:
|
||||
name: "problem_information"
|
||||
type: "List[str]"
|
||||
description: "A list of problems"
|
||||
problem:
|
||||
name: "problem"
|
||||
type: "str"
|
||||
description: "The current problems the customer is facing, for which he/she seeks a solution"
|
||||
required: false
|
||||
implication_information:
|
||||
name: "implication_information"
|
||||
type: "List[str]"
|
||||
implication:
|
||||
name: "implication"
|
||||
type: "str"
|
||||
description: "A list of implications"
|
||||
required: false
|
||||
needs_information:
|
||||
name: "needs_information"
|
||||
type: "List[str]"
|
||||
needs:
|
||||
name: "needs"
|
||||
type: "str"
|
||||
description: "A list of needs"
|
||||
required: false
|
||||
additional_info:
|
||||
name: "additional_info"
|
||||
type: "str"
|
||||
description: "Additional information that may be commercially interesting"
|
||||
required: false
|
||||
lead_info:
|
||||
lead_personal_info:
|
||||
name:
|
||||
name: "name"
|
||||
type: "str"
|
||||
description: "name of the lead"
|
||||
required: "true"
|
||||
job_title:
|
||||
name: "job_title"
|
||||
type: "str"
|
||||
description: "job title"
|
||||
required: false
|
||||
email:
|
||||
name: "email"
|
||||
type: "str"
|
||||
description: "lead email"
|
||||
required: "false"
|
||||
phone:
|
||||
name: "phone"
|
||||
type: "str"
|
||||
description: "lead phone"
|
||||
required: false
|
||||
additional_info:
|
||||
name: "additional_info"
|
||||
type: "str"
|
||||
description: "additional info on the lead"
|
||||
required: false
|
||||
lead_company_info:
|
||||
company_name:
|
||||
name: "company_name"
|
||||
type: "str"
|
||||
description: "Name of the lead company"
|
||||
required: false
|
||||
industry:
|
||||
name: "industry"
|
||||
type: "str"
|
||||
description: "The industry of the company"
|
||||
required: false
|
||||
company_size:
|
||||
name: "company_size"
|
||||
type: "int"
|
||||
description: "The size of the company"
|
||||
required: false
|
||||
company_website:
|
||||
name: "company_website"
|
||||
type: "str"
|
||||
description: "The main website for the company"
|
||||
required: false
|
||||
additional_info:
|
||||
name: "additional_info"
|
||||
type: "str"
|
||||
description: "Additional information that may be commercially interesting"
|
||||
required: false
|
||||
agents:
|
||||
- type: "RAG_AGENT"
|
||||
version: "1.0"
|
||||
name: "Default RAG Agent" # Just added as an example. Overwrites the default agent name.
|
||||
description: "An Agent that does RAG based on a user's question, RAG content & history" # Just added as an example. Overwrites the default agent description.
|
||||
- type: "RAG_COMMUNICATION_AGENT"
|
||||
version: "1.0"
|
||||
- type: "SPIN_DETECTION_AGENT"
|
||||
version: "1.0"
|
||||
- type: "SPIN_SALES_SPECIALIST_AGENT"
|
||||
version: "1.0"
|
||||
- type: "IDENTIFICATION_AGENT"
|
||||
version: "1.0"
|
||||
- type: "EMAIL_CONTENT_AGENT"
|
||||
version: "1.0"
|
||||
- type: "EMAIL_ENGAGEMENT_AGENT"
|
||||
- type: "RAG_COMMUNICATION_AGENT"
|
||||
version: "1.0"
|
||||
tasks:
|
||||
- type: "RAG_TASK"
|
||||
@@ -115,9 +173,7 @@ tasks:
|
||||
version: "1.0"
|
||||
- type: "IDENTIFICATION_QUESTIONS_TASK"
|
||||
version: "1.0"
|
||||
- type: "EMAIL_LEAD_DRAFTING_TASK"
|
||||
version: "1.0"
|
||||
- type: "EMAIL_LEAD_ENGAGEMENT_TASK"
|
||||
- type: "RAG_CONSOLIDATION_TASK"
|
||||
version: "1.0"
|
||||
metadata:
|
||||
author: "Josako"
|
||||
|
||||
@@ -27,6 +27,7 @@ expected_output: >
|
||||
- Addresses the lead by name
|
||||
- Acknowledges their role and company
|
||||
- Highlights how {company} can meet their specific needs or interests
|
||||
{customer_expected_output}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2025-01-08"
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
version: "1.0.0"
|
||||
name: "Identification Gathering"
|
||||
task_description: >
|
||||
Detect and pass on identification information in the ongoing conversation, from within the following information:
|
||||
{question}
|
||||
Add to or refine the following already gathered identification information (between triple $)
|
||||
$$${Identification}$$$
|
||||
You are asked to gather lead information in a conversation with a new prospect. This is information about the person
|
||||
participating in the conversation, and information on the company he or she is working for. Try to be as precise as
|
||||
possible.
|
||||
Take into account information already gathered in the history (between triple backquotes) and add information found in
|
||||
the latest reply.
|
||||
|
||||
history:
|
||||
```{history}```
|
||||
latest reply:
|
||||
{query}
|
||||
|
||||
{custom_description}
|
||||
expected_output: >
|
||||
Identification information such as name, email, phone number, company, role, company website, ...
|
||||
- Personal Identification information such as name, email, phone number, job title, and any additional information that
|
||||
may prove to be interesting in the current or future conversations.
|
||||
- Company information such as company name, industry, size, company website, ...
|
||||
{custom_expected_output}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
version: "1.0.0"
|
||||
name: "Define Identification Questions"
|
||||
task_description: >
|
||||
Ask questions to complete or confirm the identification information gathered.
|
||||
Current Identification Information:
|
||||
$$${Identification}$$$
|
||||
Gather the identification information gathered by your team mates , take into account the history (in between triple
|
||||
backquotes) of the conversation, and the latest reply of the user.
|
||||
Define questions to be asked to complete the personal and company information for the end user in the conversation.
|
||||
history:
|
||||
```{history}```
|
||||
latest reply:
|
||||
{query}
|
||||
|
||||
{custom_description}
|
||||
expected_output: >
|
||||
Top 2 questions to ask in order to complete identification.
|
||||
- Personal Identification information such as name, email, phone number, job title, and any additional information that
|
||||
may prove to be interesting in the current or future conversations.
|
||||
- Company information such as company name, industry, size, company website, ...
|
||||
{custom_expected_output}
|
||||
- Top {nr_of_questions} questions to ask in order to complete identification.
|
||||
{custom_expected_output}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
|
||||
23
config/tasks/RAG_CONSOLIDATION_TASK/1.0.0.yaml
Normal file
23
config/tasks/RAG_CONSOLIDATION_TASK/1.0.0.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: "1.0.0"
|
||||
name: "Rag Consolidation"
|
||||
task_description: >
|
||||
Your teams have collected answers to a user's query (in between triple backquotes), and collected additional follow-up
|
||||
questions (in between triple %) to reach their goals. Ensure the answers are provided, and select the additional
|
||||
questions to be asked in order not to overwhelm the user. Make a selection of maximum {nr_of_questions} questions to
|
||||
be returned to the user. You ensure both answers and additional questions are bundled into 1 clear communication back
|
||||
to the user. Use {language} for your consolidated communication.
|
||||
{custom_description}
|
||||
|
||||
Anwers:
|
||||
```{prepared_answers}```
|
||||
|
||||
Additional Questions:
|
||||
%%%{additional_questions}%%%
|
||||
expected_output: >
|
||||
One consolidated communication towards the end user with both answers and maximum {nr_of_questions} questions.
|
||||
{custom_expected_output}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2025-01-08"
|
||||
description: "A Task to consolidate questions and answers"
|
||||
changes: "Initial version"
|
||||
@@ -1,21 +1,21 @@
|
||||
version: "1.0.0"
|
||||
name: "RAG Task"
|
||||
task_description: >
|
||||
Answer the question based on the following context, delimited between triple backquotes, and taking into account
|
||||
Answer the query based on the following context, delimited between triple backquotes, and taking into account
|
||||
the history of the discussion, in between triple %
|
||||
{custom_description}
|
||||
Use the following {language} in your communication, and cite the sources used at the end of the full conversation.
|
||||
If the question cannot be answered using the given context, say "I have insufficient information to answer this question."
|
||||
If the question cannot be answered using the given context, answer "I have insufficient information to answer this question."
|
||||
Context:
|
||||
```{context}```
|
||||
History:
|
||||
%%%{history}%%%
|
||||
Question:
|
||||
{question}
|
||||
Query:
|
||||
{query}
|
||||
expected_output: >
|
||||
An answer to the question asked formatted in markdown, without '```'.
|
||||
A list of sources used in generating the answer.
|
||||
An indication (True or False) of your ability to provide an answer.
|
||||
- Answer
|
||||
- A list of sources used in generating the answer, citations
|
||||
- An indication (True or False) if there's insufficient information to give an answer.
|
||||
metadata:
|
||||
author: "Josako"
|
||||
date_added: "2025-01-08"
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
version: "1.0.0"
|
||||
name: "SPIN Information Detection"
|
||||
task_description: >
|
||||
Detect the SPIN-context, taking into account the history of the discussion (in between triple %) with main focus on
|
||||
the latest reply (which can contain answers on previously asked questions by the user). Do not remove elements from
|
||||
the known SPIN (in between triple $) analysis unless explicitly stated by the end user in the latest reply. In all other cases, refine the
|
||||
current SPIN analysis or add elements to it.
|
||||
Detect the SPIN-context, taking into account the history of the discussion (in between triple backquotes) with main focus on
|
||||
the latest reply (which can contain answers on previously asked questions by the user). Spin elements may already be
|
||||
provided in the history. Add or refine these with the new input provided in the latest reply of the end user.
|
||||
{custom_description}
|
||||
Use the following {tenant_language} to define the SPIN-elements. If no additional information can be added, just
|
||||
return the already known SPIN.
|
||||
Use the following {tenant_language} to define the SPIN-elements.
|
||||
History:
|
||||
%%%{history}%%%
|
||||
Known SPIN:
|
||||
$$${SPIN}$$$
|
||||
```{history}```
|
||||
Latest reply:
|
||||
{question}
|
||||
{query}
|
||||
expected_output: >
|
||||
The SPIN analysis, comprised of:
|
||||
- Situation information - Information to understanding the customer's current context, as a markdown list without '```'.
|
||||
- Problem information - Information on uncovering the customer's challenges and pain points, as a markdown list without '```'.
|
||||
- Implication information - Exploration of the consequences of those problems, as a markdown list without '```'.
|
||||
- Need-payoff information - Helping customers realize value of solutions and defining their direct needs, as a markdown list without '```'.
|
||||
- Situation information: a description of the customer's current context / situation.
|
||||
- Problem information: a description of the customer's problems uncovering it's challenges and pain points.
|
||||
- Implication information: implications of situation / identified problems, i.e. of the consequences of those problems.
|
||||
- Need-payoff information: Customer's needs, helping customers realize value of solutions.
|
||||
- Additional info: Information that does not fit in the above SPIN-categories, but that can be commercially interesting.
|
||||
{custom_expected_output}
|
||||
metadata:
|
||||
author: "Josako"
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
version: "1.0.0"
|
||||
name: "SPIN Question Identification"
|
||||
task_description: >
|
||||
Define, taking into account the history of the discussion (in between triple %), the latest reply and the currently
|
||||
known SPIN-elements (in between triple $), the top questions that need to be asked to understand the full SPIN context
|
||||
Define, taking into account the history of the discussion (in between triple backquotes) and the latest reply and the
|
||||
currently known SPIN-elements, the top questions that need to be asked to understand the full SPIN context
|
||||
of the customer. If you think this user could be a potential customer, please indicate so.
|
||||
{custom_description}
|
||||
Use the following {tenant_language} to define the SPIN-elements. If you have a full SPIN context, just skip and don't
|
||||
ask for more information or confirmation.
|
||||
History:
|
||||
%%%{history}%%%
|
||||
Known SPIN:
|
||||
$$${SPIN}$$$
|
||||
```{history}```
|
||||
Latest reply:
|
||||
{question}
|
||||
{query}
|
||||
expected_output: >
|
||||
The SPIN analysis, comprised of:
|
||||
- Situation information: a description of the customer's current context / situation.
|
||||
- Problem information: a description of the customer's problems uncovering it's challenges and pain points.
|
||||
- Implication information: implications of situation / identified problems, i.e. of the consequences of those problems.
|
||||
- Need-payoff information: Customer's needs, helping customers realize value of solutions.
|
||||
- Additional info: Information that does not fit in the above SPIN-categories, but that can be commercially interesting.
|
||||
The SPIN questions:
|
||||
- At max {nr_of_spin_questions} questions to complete the SPIN-context of the customer, as a markdown list without '```'.
|
||||
- At max {nr_of_questions} questions to complete the SPIN-context of the customer, as a markdown list without '```'.
|
||||
Potential Customer Indication:
|
||||
- An indication if - given the current SPIN - this could be a good customer (True) or not (False).
|
||||
{custom_expected_output}
|
||||
|
||||
@@ -16,6 +16,10 @@ AGENT_TYPES = {
|
||||
"name": "Rag Agent",
|
||||
"description": "An Agent that does RAG based on a user's question, RAG content & history",
|
||||
},
|
||||
"RAG_COMMUNICATION_AGENT": {
|
||||
"name": "Rag Communication Agent",
|
||||
"description": "An Agent that consolidates both answers and questions in a consistent reply",
|
||||
},
|
||||
"SPIN_DETECTION_AGENT": {
|
||||
"name": "SPIN Sales Assistant",
|
||||
"description": "An Agent that detects SPIN information in an ongoing conversation",
|
||||
|
||||
31
config/type_defs/prompt_types.py
Normal file
31
config/type_defs/prompt_types.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# Agent Types
|
||||
PROMPT_TYPES = {
|
||||
"encyclopedia": {
|
||||
"name": "encyclopedia",
|
||||
"description": "A background information retriever for Evie",
|
||||
},
|
||||
"history": {
|
||||
"name": "history",
|
||||
"description": "Prompt to further detail a question based on the previous conversation",
|
||||
},
|
||||
"html_parse": {
|
||||
"name": "html_parse",
|
||||
"description": "An aid in transforming HTML-based inputs to markdown",
|
||||
},
|
||||
"pdf_parse": {
|
||||
"name": "pdf_parse",
|
||||
"description": "An assistant to parse PDF-content into markdown",
|
||||
},
|
||||
"rag": {
|
||||
"name": "rag",
|
||||
"description": "The Main RAG retriever",
|
||||
},
|
||||
"summary": {
|
||||
"name": "summary",
|
||||
"description": "An assistant to create a summary when multiple chunks are required for 1 file",
|
||||
},
|
||||
"transcript": {
|
||||
"name": "transcript",
|
||||
"description": "An assistant to transform a transcript to markdown.",
|
||||
},
|
||||
}
|
||||
@@ -2,30 +2,6 @@
|
||||
RETRIEVER_TYPES = {
|
||||
"STANDARD_RAG": {
|
||||
"name": "Standard RAG Retriever",
|
||||
"description": "Retrieving all embeddings conform the query",
|
||||
"configuration": {
|
||||
"es_k": {
|
||||
"name": "es_k",
|
||||
"type": "int",
|
||||
"description": "K-value to retrieve embeddings (max embeddings retrieved)",
|
||||
"required": True,
|
||||
"default": 8,
|
||||
},
|
||||
"es_similarity_threshold": {
|
||||
"name": "es_similarity_threshold",
|
||||
"type": "float",
|
||||
"description": "Similarity threshold for retrieving embeddings",
|
||||
"required": True,
|
||||
"default": 0.3,
|
||||
},
|
||||
},
|
||||
"arguments": {
|
||||
"query": {
|
||||
"name": "query",
|
||||
"type": "str",
|
||||
"description": "Query to retrieve embeddings",
|
||||
"required": True,
|
||||
},
|
||||
}
|
||||
"description": "Retrieving all embeddings from the catalog conform the query",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,9 @@ SERVICE_TYPES = {
|
||||
"DEPLOY_API": {
|
||||
"name": "DEPLOY_API",
|
||||
"description": "Service allows to use deployment API functionality.",
|
||||
},
|
||||
"SPECIALIST_API": {
|
||||
"name": "SPECIALIST_API",
|
||||
"description": "Service allows to use specialist execution API functionality.",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Specialist Types
|
||||
SPECIALIST_TYPES = {
|
||||
"STANDARD_RAG": {
|
||||
"STANDARD_RAG_SPECIALIST": {
|
||||
"name": "Q&A RAG Specialist",
|
||||
"description": "Standard Q&A through RAG Specialist",
|
||||
},
|
||||
|
||||
@@ -28,4 +28,8 @@ TASK_TYPES = {
|
||||
"name": "SPIN Question Identification",
|
||||
"description": "A Task that identifies questions to complete the SPIN context in a conversation",
|
||||
},
|
||||
"RAG_CONSOLIDATION_TASK": {
|
||||
"name": "RAG Consolidation",
|
||||
"description": "A Task to consolidate questions and answers",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user