EverMind-AI commited on
Commit
fcbb966
·
verified ·
1 Parent(s): af10c3b

Query prompt: one space after the instruction, as used in the paper

Browse files
Files changed (2) hide show
  1. README.md +4 -4
  2. config_sentence_transformers.json +1 -1
README.md CHANGED
@@ -43,9 +43,9 @@ before that) or `sentence-transformers>=3.0`.
43
  ## Usage
44
 
45
  The two sides are encoded asymmetrically: a task description carries an
46
- instruction prefix (no space between the prefix and the task), and a skill is its
47
- bare body. Encode them this way or retrieval quality drops. Embeddings come back
48
- L2-normalized, so cosine similarity is a plain dot product.
49
 
50
  ```python
51
  import torch
@@ -58,7 +58,7 @@ model = AutoModel.from_pretrained(MODEL, dtype=torch.bfloat16).cuda().eval()
58
 
59
  QUERY_INSTRUCTION = (
60
  "Instruct: Given a coding task description, retrieve the most relevant "
61
- "skill document that would help an agent complete the task\nQuery:"
62
  )
63
 
64
 
 
43
  ## Usage
44
 
45
  The two sides are encoded asymmetrically: a task description carries an
46
+ instruction prefix followed by one space, and a skill is its bare body. Encode
47
+ them this way or retrieval quality drops. Embeddings come back L2-normalized, so
48
+ cosine similarity is a plain dot product.
49
 
50
  ```python
51
  import torch
 
58
 
59
  QUERY_INSTRUCTION = (
60
  "Instruct: Given a coding task description, retrieve the most relevant "
61
+ "skill document that would help an agent complete the task\nQuery: "
62
  )
63
 
64
 
config_sentence_transformers.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "prompts": {
3
- "query": "Instruct: Given a coding task description, retrieve the most relevant skill document that would help an agent complete the task\nQuery:",
4
  "document": ""
5
  },
6
  "default_prompt_name": null,
 
1
  {
2
  "prompts": {
3
+ "query": "Instruct: Given a coding task description, retrieve the most relevant skill document that would help an agent complete the task\nQuery: ",
4
  "document": ""
5
  },
6
  "default_prompt_name": null,