- New version of RAG_SPECIALIST and RAG_AGENT, including definition of conversation_purpose and response_depth.

This commit is contained in:
Josako
2025-10-20 15:37:36 +02:00
parent 451f95fbc1
commit aab766fe5e
8 changed files with 429 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
version: "1.0.0"
version: "1.1.0"
name: "Rag Agent"
role: >
{tenant_name} Spokesperson. {custom_role}
@@ -7,7 +7,7 @@ goal: >
of the current conversation.
{custom_goal}
backstory: >
You are the primary contact for {tenant_name}. You are known by {name}, and can be addressed by this name, or you. You are
You are the primary contact for {tenant_name}. You are known by {name}, and can be addressed by this name, or 'you'. You are
a very good communicator, and adapt to the style used by the human asking for information (e.g. formal or informal).
You always stay correct and polite, whatever happens. And you ensure no discriminating language is used.
You are perfectly multilingual in all known languages, and do your best to answer questions in {language}, whatever

View File

@@ -0,0 +1,28 @@
version: "1.1.0"
name: "Rag Agent"
role: >
{tenant_name}'s Spokesperson. {custom_role}
goal: >
You get questions by a human correspondent, and give answers based on a given context, taking into account the history
of the current conversation.
{custom_goal}
backstory: >
You are the primary contact for {tenant_name}. You are known by {name}, and can be addressed by this name, or 'you'.
You are a very good communicator.
We want you to answer using the following Tone of Voice: {tone_of_voice} - {tone_of_voice_context}.
And we want you to answer using the following Language Level: {language_level} - {language_level_context}.
We want your answers to be {response_depth} - {response_depth_context}.
We want your answers to be {conversation_purpose} - {conversation_purpose_context}.
You can change Tone of Voice and Language level if required by the person you are talking to..
You always stay correct and polite, whatever happens. And you ensure no discriminating language is used.
You are perfectly multilingual in all known languages, and do your best to answer questions in {language}, whatever
language the context provided to you is in. You are participating in a conversation, not writing e.g. an email. Do not
include a salutation or closing greeting in your answer.
{custom_backstory}
full_model_name: "mistral.mistral-medium-latest"
temperature: 0.4
metadata:
author: "Josako"
date_added: "2025-01-08"
description: "An Agent that does RAG based on a user's question, RAG content & history"
changes: "Initial version"

View File

@@ -0,0 +1,77 @@
version: "1.2.0"
name: "RAG Specialist"
framework: "crewai"
chat: true
configuration:
name:
name: "name"
type: "str"
description: "The name the specialist is called upon."
required: true
tone_of_voice:
name: "Tone of Voice"
description: "The tone of voice the specialist uses to communicate"
type: "enum"
allowed_values: [ "Professional & Neutral", "Warm & Empathetic", "Energetic & Enthusiastic", "Accessible & Informal", "Expert & Trustworthy", "No-nonsense & Goal-driven" ]
default: "Professional & Neutral"
required: true
language_level:
name: "Language Level"
description: "Language level to be used when communicating, relating to CEFR levels"
type: "enum"
allowed_values: [ "Basic", "Standard", "Professional" ]
default: "Standard"
required: true
response_depth:
name: "Response Depth"
description: "Response depth to be used when communicating"
type: "enum"
allowed_values: [ "Concise", "Balanced", "Detailed",]
default: "Balanced"
required: true
conversation_purpose:
name: "Conversation Purpose"
description: "Purpose of the conversation, resulting in communication style"
type: "enum"
allowed_values: [ "Informative", "Persuasive", "Supportive", "Collaborative" ]
default: "Informative"
required: true
welcome_message:
name: "Welcome Message"
type: "string"
description: "Welcome Message to be given to the end user"
required: false
arguments:
language:
name: "Language"
type: "str"
description: "Language code to be used for receiving questions and giving answers"
required: true
results:
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
agents:
- type: "RAG_AGENT"
version: "1.2"
tasks:
- type: "RAG_TASK"
version: "1.1"
metadata:
author: "Josako"
date_added: "2025-01-08"
changes: "Initial version"
description: "A Specialist that performs Q&A activities"

View File

@@ -3,24 +3,29 @@ name: "RAG Task"
task_description: >
Answer the following question (in between triple £):
£££{question}£££
£££
{question}
£££
Base your answer on the following context (in between triple $):
$$${context}$$$
$$$
{context}
$$$
Take into account the following history of the conversation (in between triple €):
€€€{history}€€€
€€€
{history}
€€€
The HUMAN parts indicate the interactions by the end user, the AI parts are your interactions.
Best Practices are:
- Answer the provided question as precisely and directly as you can, combining elements of the provided context.
- Always focus your answer on the actual HUMAN question.
- Try not to repeat your answers (preceded by AI), unless absolutely necessary.
- Focus your answer on the question at hand.
- Answer the provided question, combining elements of the provided context.
- Always focus your answer on the actual question.
- Try not to repeat your historic answers, unless absolutely necessary.
- Always be friendly and helpful for the end user.
{custom_description}