Zongxia commited on
Commit
30cc38e
β€’
1 Parent(s): 2d9149d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -0
README.md CHANGED
@@ -41,6 +41,32 @@ Exact Match: False
41
  '''
42
  ```
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  #### Transformer Match
45
  Our fine-tuned BERT model is this repository. Our Package also supports downloading and matching directly. distilroberta, distilbert, and roberta are also supported now! πŸ”₯πŸ”₯πŸ”₯
46
 
 
41
  '''
42
  ```
43
 
44
+ #### Prompting LLM For Evaluation
45
+
46
+ Note: The prompting function can be used for any prompting purposes.
47
+
48
+ ###### OpenAI
49
+ ```python
50
+ from qa_metrics.prompt_llm import *
51
+ set_openai_api_key(YOUR_OPENAI_KEY)
52
+ prompt = 'question: What is the Capital of France?\nreference: Paris\ncandidate: The capital is Paris\nIs the candidate answer correct based on the question and reference answer? Please only output correct or incorrect.'
53
+ prompt_gpt(prompt=prompt, model_engine='gpt-3.5-turbo', temperature=0.1, max_token=10)
54
+
55
+ '''
56
+ 'correct'
57
+ '''
58
+ ```
59
+
60
+ ###### Anthropic
61
+ ```python
62
+ set_anthropic_api_key(YOUR_OPENAI_KEY)
63
+ prompt_claude(prompt=prompt, model_engine='claude-v1', anthropic_version="2023-06-01", max_tokens_to_sample=100, temperature=0.7)
64
+
65
+ '''
66
+ 'correct'
67
+ '''
68
+ ```
69
+
70
  #### Transformer Match
71
  Our fine-tuned BERT model is this repository. Our Package also supports downloading and matching directly. distilroberta, distilbert, and roberta are also supported now! πŸ”₯πŸ”₯πŸ”₯
72