unhcr / config /conf_0.1.yaml
elyxlz
update prompt
15524d6
# chatbot model
model:
_target_: modules.initialize_agent
agent: "conversational-react-description" # langchain template for agent
tools:
- _target_: langchain.agents.Tool
name: "Content Search"
func:
_target_: tools.SemanticSearch
threshold: 0.5
k: 5
description: ^
A content search through the UNHCR documents, it will return relevant extracts for your query.
The action input should be a full english sentence.
ALWAYS use this to answer ANY question. If the tool doesn't return anything, say that you don't know.
llm:
_target_: langchain.llms.OpenAI
temperature: 0
openai_api_key: ${oc.env:OPENAI_API_KEY} # environment variable
memory:
_target_: langchain.chains.conversation.memory.ConversationBufferWindowMemory
memory_key: "chat_history"
k: 5 # how many of the past interactions it keeps
#verbose: True
prefix: |
- You are an AI whose purpose is to help answer questions.
- You answer in a factual manner, always basing your answer on the context provided to you
- You are free to ignore irrelevant information
- If you do not know something, you will say that you don't know.
- Give long answers, answering every question with a lot of detail.
- Expand the context as you like.
TOOLS:
------
You have access to the following tools:
suffix: |
Begin!
Previous conversation history:
{chat_history}
New input: {input}
{agent_scratchpad}
ai_prefix: "AI"
verbose: True