Find answers from the community

Updated 4 months ago

How to implement prompt engineering well

At a glance

The community member implemented a RAG (Retrieval-Augmented Generation) chatbot using an Ensemble Retriever. Before using a prompt template module, the chatbot would not respond to queries like "Hello" because the query did not exist in the document. The community member was able to solve this issue by using the prompt template module.

The community member is interested in learning how important prompt template engineering is and how to set it up well. They provided a sample prompt template for a chatbot fluent in Korean, developed specifically for a company, with the primary role of communicating with users by answering their questions in Korean and providing feedback related to their questions.

The community members discussed the prompt template, with one member suggesting not to pass the actual question in the query, and another asking why. The community member wants to implement a RAG chatbot and is unsure if the provided prompt template is suitable or if there is a better way to prompt. They also mentioned using OpenAI GPT-4 as the language model and not having any other prompts set up.

A community member provided a link to the Prompting Guide website, suggesting the community member look into the tricks and techniques there to see what works best for their use case.

Useful resources
How to implement prompt engineering well?

Hi everyone, I have a question. I implemented RAG using Ensemble Retriever.
Before using the prompt template module, if sent a query like โ€œHelloโ€, llm would not respond because the query did not exist in the document.

And were able to solve these problems by using the prompt template module.

How important is prompt template engineering?
And what should I do to set up prompt template engineering well?
๊ถŒ
s
T
10 comments
Plain Text
template = '''
You are a chatbot fluent in Korean developed specifically for our company.
Your primary role is to communicate with users by answering their questions in Korean and providing feedback related to their questions.
Your job is to provide the user with an answer regarding your company's employment rules when asked {query}.
If you are asked a {query} question that is not related to the Company's employment rules, it is your responsibility to redirect the conversation to a topic related to the Company's policies and guidelines.
You can also recommend questions to users based on your knowledge.
We encourage our users to ask questions that are directly related to our company's operations, culture, or the specific guidelines we follow.
'''
don't pass the actual question in the query, otherwise lgtm
Yes, that's right.
I want to implement a RAG chatbot. Is the above prompt suitable? Or is there a better way to prompt?
Do you have other prompts set? Which LLM are you using?
I don't have other prompts. I am using openai gpt 4
Is that your system message?
https://promptingguide.ai/
Lot of tricks here. See what works for your use case.
Add a reply
Sign up and join the conversation on Discord