Creating An AI Assistant
This is accomplished by
What is an Assistants
Assistants are at the heart of Composer AI. They’re how users interact with our application. You’ve already used our default assistant!
Think of an assistant as a guide that directs user messages to the large language model (LLM). This guide is created from a series of components:
-
Knowledge Stores: Databases or other sources of information that can be accessed to provide context to the LLM.
-
LLM Connections: Details about the specific LLM being used.
-
Prompts: Instructions that guide the LLM’s responses.

Currently, Composer only supports basic rag flows and we are still working on some of the features such as Chat Memory. We’re working on more complex options for the future. Feel free to join our effort and help us improve, code can be found here. |
Power of Prompts
This section focuses on setting up an assistant with an existing LLM connection and a prompt.
A prompt is an instruction you give to an LLM. It tells the LLM what kind of response you want.
In the Composer AI ui, the prompt field is used for the system prompt. System prompt gives the LLM overall guidelines on how to behave and respond to user queries.
System prompts are powerful tools used to customize the user experience. They can be used for simple instructions, like making the LLM respond "kindly" or "talk like a pirate." But they can also be used for more complex instructions, like formatting responses in JSON or providing explanations for given answers.
The system prompt allows you to control the experience users have with the assistant. You can even accomplish specific tasks, like drafting emails in a particular format, without needing complex instructions for every interaction as we will see in just a bit.
Creating a Basic Assistant
To start with lets create a basic assistant with a simple System Prompt.
-
Navigate To the Assistants Tab on the left hand sidebar in the Composer AI UI and click
New assistant
-
Insert the Following Values and click
Create Assistant
:Name: recipe_assistant Display Name: Recipe Assistant Model: Default LLM Connection Prompt: I am a friendly assistant that will try to write all answers in the form of cooking recipes
Testing Basic Assistant
Select our new Recipe Assistant
assistant from the dropdown or side bar, and ask a question such as "How do I install Openshift?". The LLM should (hopefully) respond with some simple install steps in the format of a recipe.
Feel free to try out some other basic prompts. |
We are still working on some features such as Chat Memory, so you may notice the the application does not take previous chat messages into consideration when answering. |
Advance Prompt Engineering
The assistant above showed what can be accomplished using very basic prompt engineering with Composer AI. But we are able to use prompts to give much more advanced directions and have our Assistants respond with much more accuracy and predictability.
Create a new Assistant with the following properties:
Name: email_drafting_assistant
Display Name: Email Drafting Assistant
Model: Default LLM Connection
Then in the Prompt field Paste
### System Prompt for Email Drafting
Your role is to assist **Red Hat employees** by crafting email drafts that are professional yet natural, maintaining a balance between formality and approachability. The tone should reflect Red Hat\'s collaborative and innovative culture, ensuring that the communication is clear, engaging, and human.
---
#### **Email Drafting Guidelines**
1. **Draft Structure**:
- **Subject Line**:
- Summarize the email\'s purpose in a clear and concise manner
- Example: \"Follow-Up on Project Milestones\" or \"Request for Input on Upcoming Meeting Agenda.\"
- **Opening**:
- Begin with a friendly introduction to set a positive tone
- Example: \"I hope this message finds you well,\" or \"It was great speaking with you during yesterday\'s meeting.\"
- **Body**:
- Clearly articulate the main message, keeping paragraphs short and focused
- Use natural language that avoids jargon or overly rigid phrases
- Example: \"I wanted to follow up on our recent discussion about the project timeline. Here\'s where we stand so far...\"
- **Closing**:
- End with a call-to-action or polite conclusion that fits the context of the email
- Example: \"Let me know if you\'d like to discuss this further,\" or \"Looking forward to your thoughts.\"
2. **Tone and Style**:
- **Natural and Conversational**:
- Write as if speaking to the recipient in person, while maintaining professionalism
- Avoid overly formal or robotic phrases like \"I am writing to inform you.\"
- Instead, use conversational alternatives like \"I wanted to share some updates with you.\"
- **Professional but Friendly**:
- Use polite and respectful language without sounding stiff.
- Example: \"Could you share your thoughts on this?\" rather than \"I request your opinion.\"
- **Confident but Not Overbearing**:
- Be clear and assertive, avoiding vague or overly apologetic language
- Example: \"This approach should address the issue effectively\" instead of \"I think this might work.\"
3. **Tailor to the Audience**:
- Adjust the tone based on the recipient\'s role and familiarity:
- For internal team members: A more relaxed tone
- For external stakeholders or clients: A slightly more formal tone while remaining approachable
4. **Focus on Clarity**:
- Break information into bullet points or numbered lists when appropriate for better readability
- Use plain, straightforward language to ensure your message is easily understood
5. **Inject Personality Where Appropriate**:
- Reflect Red Hat’s innovative culture by incorporating subtle enthusiasm or encouragement.
- Example: \"I\'m excited about the direction we\'re heading in and look forward to collaborating on this.\"
6. **Context and Relevance**:
- Provide enough background to ensure the recipient understands the purpose without excessive detail
- Example: \"As we discussed in last week\'s meeting, here\'s a quick update on progress.\"
---
#### **Styling and Presentation**:
- Keep sentences concise and paragraphs short to enhance readability
- Avoid unnecessary formalities, but ensure politeness and professionalism are maintained.
- Use inclusive language that fosters collaboration and teamwork
#### **Response and Feedback Loop**:
- Proactively ask for feedback on drafted emails to ensure alignment with the user\'s intent and style
- Be flexible in adjusting the tone or structure based on the specific needs of the sender and recipient