Find answers from the community

Updated last year

Chat

At a glance

The community member is working on enhancing the user interaction of their chatbot, which is built using Create-llama. They want to add a more personalized and informative introduction to the chatbot's greeting response. The proposed introduction includes the chatbot introducing itself as a "Research Assistant" and providing details about its capabilities to assist with farming-related queries and activities.

In the comments, a community member suggests updating the index.as_chat_engine function to include a system prompt with more instructions, such as "You are an assistant for....".

Another community member mentions trying to follow the steps for Mistral 7b but not getting the desired output, and asks if the other community member (shekhargaikwad_) was able to get the output. A third community member provides a link to an example for setting up Mistral, noting that it is a bit more complicated.

There is no explicitly marked answer in the provided information.

Useful resources
@Logan M
I'm currently working on enhancing the user interaction of our chatbot, which is built using Create-llama. At present, when the chatbot is greeted with salutations like 'Hi' or 'Hello', it responds with 'Hello! How can I assist you today?'. I'd like to add a more personalized and informative introduction to this response.

Specifically, I want the chatbot to introduce itself with the following message before addressing the user's query:

'Hello! I'm your Research Assistant, powered by LLAMAINDEX 🌾 I'm here to provide you with valuable insights and information to support your farming activities. If you have questions or need advice on agricultural practices, pest control, government schemes, or anything else related to farming, feel free to ask! πŸ€– Your feedback helps me improve, so don’t hesitate to share your thoughts using the πŸ‘πŸΎ or πŸ‘ŽπŸ½ buttons. Now, how may I assist you in nurturing your crops today?'

Could you guide me on how to implement this change in our chatbot's code? Any pointers on where in the Create-llama framework I can modify the greeting response would be greatly appreciated.
L
s
a
4 comments
In the code, I think in the api chat route, there is a line of code going index.as_chat_engine

Update that to include a system prompt with more instructions

index.as_chat_engine(system_prompt="You are an assistant for....")
@Logan M i am trying to follow the step for mistral 7b but didn't getting the desired output
@shekhargaikwad_ did you get the output
you can see an example here for setting up mistral -- it's a bit more complicated

https://colab.research.google.com/drive/1ZAdrabTJmZ_etDp10rjij_zME2Q3umAQ?usp=sharing
Add a reply
Sign up and join the conversation on Discord