Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
9e67862
1
Parent(s):
52dde58
Switch to Chain Rerankers
Browse files
agent.py
CHANGED
@@ -30,7 +30,17 @@ def create_assistant_tools(cfg):
|
|
30 |
returns a response to a user question about electric vehicles.
|
31 |
""",
|
32 |
tool_args_schema = QueryElectricCars,
|
33 |
-
reranker = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.005,
|
35 |
summary_num_results = 5,
|
36 |
vectara_summarizer = summarizer,
|
@@ -60,7 +70,17 @@ def create_assistant_tools(cfg):
|
|
60 |
You can ask this tool any question about laws passed by states or the federal government related to electric vehicles.
|
61 |
""",
|
62 |
tool_args_schema = QueryEVLaws,
|
63 |
-
reranker = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.005,
|
65 |
summary_num_results = 10,
|
66 |
vectara_summarizer = summarizer,
|
|
|
30 |
returns a response to a user question about electric vehicles.
|
31 |
""",
|
32 |
tool_args_schema = QueryElectricCars,
|
33 |
+
reranker = "chain", rerank_k = 100,
|
34 |
+
rerank_chain = [
|
35 |
+
{
|
36 |
+
"type": "slingshot",
|
37 |
+
"cutoff": 0.2
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"type": "mmr",
|
41 |
+
"diversity_bias": 0.1
|
42 |
+
}
|
43 |
+
],
|
44 |
n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.005,
|
45 |
summary_num_results = 5,
|
46 |
vectara_summarizer = summarizer,
|
|
|
70 |
You can ask this tool any question about laws passed by states or the federal government related to electric vehicles.
|
71 |
""",
|
72 |
tool_args_schema = QueryEVLaws,
|
73 |
+
reranker = "chain", rerank_k = 100,
|
74 |
+
rerank_chain = [
|
75 |
+
{
|
76 |
+
"type": "slingshot",
|
77 |
+
"cutoff": 0.2
|
78 |
+
},
|
79 |
+
{
|
80 |
+
"type": "mmr",
|
81 |
+
"diversity_bias": 0.1
|
82 |
+
}
|
83 |
+
],
|
84 |
n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.005,
|
85 |
summary_num_results = 10,
|
86 |
vectara_summarizer = summarizer,
|