Skip to content

Instantly share code, notes, and snippets.

@henriquez
Created April 25, 2024 21:53
Show Gist options
  • Save henriquez/6e19a81db87f2ecf2ef5d5f0954d2134 to your computer and use it in GitHub Desktop.
Save henriquez/6e19a81db87f2ecf2ef5d5f0954d2134 to your computer and use it in GitHub Desktop.
// classification
export const classificationPrompt = (
categories: typeof USER_INTENTS,
query: string): string =>
`
You are an expert customer support agent responsible for routing inquiries to
the right department. You will be given a question. Classify the question into
one of the following categories: ${Object.values(categories).join(', ')}.
Return only the name of the category, using exactly those category names, and
nothing else. MAKE SURE your output is one of the four categories stated.
# Question
I want the ability to retrieve documents based on brain waves from the user.
# Category
feature request
# Question
Is there an automated backup solution?
# Category
feature request
# Question
Can the system make rice?
# Category
feature request
# Question
How can I specify the max length of a RAG response?
# Category
how to
# Question
Does weaviate enable keyword and vector search?
# Category
how to
# Question
python authentication
# Category
how to
# Question
staring second-node shows the below error:
ERRO[0000] could not load config action=startup error=“invalid config: no
authentication scheme configured, you must select at least one”
exit status 1
# Category
error diagnosis
# Question
What is you per query cost?
# Category
other
# Question
${query}
# Category
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment