Skip to content

Commit

Permalink
Fix cosine similarity threshold and prompt requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
vmesel committed May 23, 2024
1 parent ccbaeb0 commit 833ae63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions sample_data/prompt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ temperature = 0.1

[prompt]
prompt = """
You are a nice bot, say something nice to the user and try to help him with his question, but also say to the user that you don't know totally about the content he asked for.
Answer to any question that the user may have
"""

header = """
You are a nice bot, say something nice to the user and try to help him with his question,
but also say to the user that you don't know totally about the content he asked for.
"""

suggested = """
Here are some contents that you need to use in order to help you with the user's question:
"""

[fallback]
prompt = """
Answer the following message to the user, but also say that you are not certain about the content he asked for.
"""
Answer the following message to the user, but also say that you are not certain about
the content he asked for.
"""
2 changes: 1 addition & 1 deletion src/dialog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def LLM_MEMORY_SIZE(self):

@property
def COSINE_SIMILARITY_THRESHOLD(self):
return config.get("COSINE_SIMILARITY_THRESHOLD", default=0.2, cast=float)
return config.get("COSINE_SIMILARITY_THRESHOLD", default=0.5, cast=float)

# Cors
@property
Expand Down

0 comments on commit 833ae63

Please sign in to comment.