Update README.md
Browse files
README.md
CHANGED
@@ -114,6 +114,61 @@ print(outputs[0].outputs[0].text)
|
|
114 |
|
115 |
This model can also take a single context and a question as input, and it will determine whether it can answer the question based on the context, outputting an answer if it can. This allows for parallel computing of multiple contexts at the same time.
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
* **Answer extension**
|
118 |
|
119 |
By default, this model is trained to output the shortest possible answer to a question. However, if you require a longer answer, you can prompt the model to write a longer answer by writing " <<Long>>" after your question.
|
|
|
114 |
|
115 |
This model can also take a single context and a question as input, and it will determine whether it can answer the question based on the context, outputting an answer if it can. This allows for parallel computing of multiple contexts at the same time.
|
116 |
|
117 |
+
<details>
|
118 |
+
<summary>Prompt style</summary>
|
119 |
+
|
120 |
+
### Input:
|
121 |
+
```markdown
|
122 |
+
<<Chunk 1>>
|
123 |
+
Junko Nakagawa, a member of the Bank of Japan's Policy Board, stated on the 11th that real interest rates are currently at an extremely low level.
|
124 |
+
She mentioned that if the BOJ's economic and price outlook materializes in the future, the degree of monetary easing would be adjusted from the perspective of achieving the price target.
|
125 |
+
|
126 |
+
<<Question>>
|
127 |
+
What is Japan's primary income balance currently?
|
128 |
+
```
|
129 |
+
|
130 |
+
### Output:
|
131 |
+
|
132 |
+
```markdown
|
133 |
+
<<References>>
|
134 |
+
None
|
135 |
+
```
|
136 |
+
|
137 |
+
### Input:
|
138 |
+
```markdown
|
139 |
+
<<Chunk 1>>
|
140 |
+
Japan's current account surplus in July was 3.2 trillion yen, the highest monthly surplus on record for the month of July.
|
141 |
+
However, the surplus continues to be driven by the primary income balance, which recorded a surplus of 4.4 trillion yen in July, the highest monthly figure on record.
|
142 |
+
|
143 |
+
<<Question>>
|
144 |
+
What is Japan's primary income balance currently?
|
145 |
+
```
|
146 |
+
|
147 |
+
### Output:
|
148 |
+
|
149 |
+
```markdown
|
150 |
+
<<References>>
|
151 |
+
1
|
152 |
+
|
153 |
+
<<Answer>>
|
154 |
+
4.4 trillion yen
|
155 |
+
```
|
156 |
+
|
157 |
+
</details>
|
158 |
+
|
159 |
+
<details>
|
160 |
+
<summary>Python code</summary>
|
161 |
+
|
162 |
+
```python
|
163 |
+
outputs = llm.generate([create_rag_prompt(x, question) for x in contexts], sampling_params)
|
164 |
+
|
165 |
+
print("###")
|
166 |
+
|
167 |
+
print([o.outputs[0].text for o in outputs])
|
168 |
+
```
|
169 |
+
|
170 |
+
</details>
|
171 |
+
|
172 |
* **Answer extension**
|
173 |
|
174 |
By default, this model is trained to output the shortest possible answer to a question. However, if you require a longer answer, you can prompt the model to write a longer answer by writing " <<Long>>" after your question.
|