zarif98sjs commited on
Commit
d59af1d
·
verified ·
1 Parent(s): 2dc1ef3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md CHANGED
@@ -1,3 +1,59 @@
1
  ---
2
  license: cc-by-nc-4.0
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-nc-4.0
3
+ language:
4
+ - en
5
+ base_model:
6
+ - NovaSearch/stella_en_400M_v5
7
+ pipeline_tag: sentence-similarity
8
+ tags:
9
+ - embeddings
10
+ - agent
11
+ - search
12
+ - retriever
13
+ - instruction-tuned retriever
14
+ - agentic-search
15
  ---
16
+
17
+ # Critic-Embed
18
+
19
+ Critic-Embed is the trained retiever from our paper [Critic-R: Improving Agentic Search using Instruction-tuned Retrievers with Natural Language Introspective Feedback](https://arxiv.org/abs/2606.00590)
20
+
21
+ # Usage
22
+
23
+ ```python
24
+ from sentence_transformers import SentenceTransformer
25
+
26
+ # This model supports two prompts: "s2p_query" and "s2s_query" for sentence-to-passage and sentence-to-sentence tasks, respectively.
27
+ # They are defined in `config_sentence_transformers.json`
28
+ query_prompt_name = "s2p_query"
29
+ queries = [
30
+ "What are some ways to reduce stress?",
31
+ "What are the benefits of drinking green tea?",
32
+ ]
33
+ # docs do not need any prompts
34
+ docs = [
35
+ "There are many effective ways to reduce stress. Some common techniques include deep breathing, meditation, and physical activity. Engaging in hobbies, spending time in nature, and connecting with loved ones can also help alleviate stress. Additionally, setting boundaries, practicing self-care, and learning to say no can prevent stress from building up.",
36
+ "Green tea has been consumed for centuries and is known for its potential health benefits. It contains antioxidants that may help protect the body against damage caused by free radicals. Regular consumption of green tea has been associated with improved heart health, enhanced cognitive function, and a reduced risk of certain types of cancer. The polyphenols in green tea may also have anti-inflammatory and weight loss properties.",
37
+ ]
38
+
39
+ model = SentenceTransformer("zarif98sjs/Critic-Embed", trust_remote_code=True).cuda()
40
+ query_embeddings = model.encode(queries, prompt_name=query_prompt_name)
41
+ doc_embeddings = model.encode(docs)
42
+ print(query_embeddings.shape, doc_embeddings.shape)
43
+
44
+ similarities = model.similarity(query_embeddings, doc_embeddings)
45
+ print(similarities)
46
+ ```
47
+
48
+ # Citation
49
+ ```bibtex
50
+ @misc{alam2026criticrimprovingagenticsearch,
51
+ title={Critic-R: Improving Agentic Search using Instruction-tuned Retrievers with Natural Language Introspective Feedback},
52
+ author={Md Zarif Ul Alam and Alireza Salemi and Hamed Zamani},
53
+ year={2026},
54
+ eprint={2606.00590},
55
+ archivePrefix={arXiv},
56
+ primaryClass={cs.IR},
57
+ url={https://arxiv.org/abs/2606.00590},
58
+ }
59
+ ```