Skip to content

Commit 833ae63

Browse files
committed
Fix cosine similarity threshold and prompt requirements
1 parent ccbaeb0 commit 833ae63

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

sample_data/prompt.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ temperature = 0.1
44

55
[prompt]
66
prompt = """
7-
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.
7+
Answer to any question that the user may have
8+
"""
9+
10+
header = """
11+
You are a nice bot, say something nice to the user and try to help him with his question,
12+
but also say to the user that you don't know totally about the content he asked for.
13+
"""
14+
15+
suggested = """
16+
Here are some contents that you need to use in order to help you with the user's question:
817
"""
918

1019
[fallback]
1120
prompt = """
12-
Answer the following message to the user, but also say that you are not certain about the content he asked for.
13-
"""
21+
Answer the following message to the user, but also say that you are not certain about
22+
the content he asked for.
23+
"""

src/dialog/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def LLM_MEMORY_SIZE(self):
7373

7474
@property
7575
def COSINE_SIMILARITY_THRESHOLD(self):
76-
return config.get("COSINE_SIMILARITY_THRESHOLD", default=0.2, cast=float)
76+
return config.get("COSINE_SIMILARITY_THRESHOLD", default=0.5, cast=float)
7777

7878
# Cors
7979
@property

0 commit comments

Comments
 (0)