liuwenhan commited on
Commit
b175a50
·
verified ·
1 Parent(s): 881a485

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md CHANGED
@@ -4,9 +4,49 @@ language:
4
  - en
5
  base_model:
6
  - intfloat/e5-base-v2
 
7
  ---
8
 
9
  ## Introduction
10
 
11
  This is the Agentic-R trained in our paper: Agentic-R: Learning to Retrieve for Agentic Search
12
  ([📝arXiv](https://arxiv.org/pdf/2601.11888)). Please refer our [🧩github repository](https://github.com/8421BCD/ReasonRank) for the detailed usage of our Agentic-R.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  - en
5
  base_model:
6
  - intfloat/e5-base-v2
7
+ pipeline_tag: sentence-similarity
8
  ---
9
 
10
  ## Introduction
11
 
12
  This is the Agentic-R trained in our paper: Agentic-R: Learning to Retrieve for Agentic Search
13
  ([📝arXiv](https://arxiv.org/pdf/2601.11888)). Please refer our [🧩github repository](https://github.com/8421BCD/ReasonRank) for the detailed usage of our Agentic-R.
14
+
15
+ ## Usage (with sentence_transformers)
16
+
17
+ Our **Agentic-R** query encoder is designed for agentic search scenarios.
18
+ For queries, the input format is:
19
+ `query: <original_question> [SEP] <agent_query>`.
20
+ Passages use the standard `passage:` prefix following E5.
21
+
22
+ Below is an example of how to compute embeddings using `sentence_transformers`:
23
+
24
+ ```python
25
+ from sentence_transformers import SentenceTransformer
26
+
27
+ model = SentenceTransformer("liuwenhan/Agentic-R_e5")
28
+
29
+ input_texts = [
30
+ # Query encoder input:
31
+ # original_question [SEP] current_query
32
+ "query: Who wrote The Old Man and the Sea? [SEP] Old Man and the Sea",
33
+
34
+ # Passages
35
+ "passage: The Old Man and the Sea is a short novel written by the American author Ernest Hemingway in 1951.",
36
+ "passage: Ernest Hemingway was an American novelist, short-story writer, and journalist, born in 1899."
37
+ ]
38
+
39
+ embeddings = model.encode(
40
+ input_texts,
41
+ normalize_embeddings=True
42
+ )
43
+ ```
44
+ Notes:
45
+
46
+ `original_question` refers to the user’s initial question.
47
+
48
+ `agent_query` refers to the intermediate query generated during the agent’s reasoning process.
49
+
50
+ Always include `[SEP]` to separate the two parts of the query.
51
+
52
+ We recommend setting `normalize_embeddings=True` for cosine similarity–based retrieval.