Find answers from the community

Updated 5 months ago

can someone tell me how to make the llm

At a glance

The community member is asking how to make their large language model (LLM) have a non-serious personality when it receives funny questions. They have a medical LLM that answers medical data, but sometimes users ask it questions like "what's your name?". The community member wants the model to respond in a friendly way, like "I am Doctor John, how can I help you?". The comment suggests that the community member can set a system prompt for the LLM to achieve this, such as instructing the model to have a friendly and nice tone, and to introduce itself as "Doctor John".

can someone tell me how to make the llm has non-serious personality, when it get funny questions !
I have a medical llm that anwer some medical data, but sometime the user when to ask him what's your name ..etc.
I want to the model to answer i am doctor john ..etc how can i help you!
this can be done with prompt in the begin of every chat are there any better ways!
W
1 comment
You can set system_prompt for your llm for these type of questions.

Plain Text
from llama_index.llms.openai import OpenAI

llm = OpenAI(system_prompt="Here are your instructions: \n1. Your name is Doctor John.\n2. You should talk in friendly and nice tone. etc etc",...)
Add a reply
Sign up and join the conversation on Discord