You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pqa ask 'How can carbon nanotubes be manufactured at a large scale?'
69
+
pqa ask 'What is PaperQA2?'
68
70
```
69
71
70
72
### Example Output
@@ -181,7 +183,7 @@ Those can be exported as `CROSSREF_API_KEY` and `SEMANTIC_SCHOLAR_API_KEY` varia
181
183
The fastest way to test PaperQA2 is via the CLI. First navigate to a directory with some papers and use the `pqa` cli:
182
184
183
185
```bash
184
-
$ pqa ask 'What manufacturing challenges are unique to bispecific antibodies?'
186
+
pqa ask 'What is PaperQA2?'
185
187
```
186
188
187
189
You will see PaperQA2 index your local PDF files, gathering the necessary metadata for each of them (using [Crossref](https://www.crossref.org/) and [Semantic Scholar](https://www.semanticscholar.org/)),
@@ -190,13 +192,13 @@ search over that index, then break the files into chunked evidence contexts, ran
190
192
All prior answers will be indexed and stored, you can view them by querying via the `search` subcommand, or access them yourself in your `PQA_HOME` directory, which defaults to `~/.pqa/`.
191
193
192
194
```bash
193
-
$ pqa search -i 'answers''antibodies'
195
+
pqa -i 'answers'search 'ranking and contextual summarization'
194
196
```
195
197
196
198
PaperQA2 is highly configurable, when running from the command line, `pqa --help` shows all options and short descriptions. For example to run with a higher temperature:
197
199
198
200
```bash
199
-
$ pqa --temperature 0.5 ask 'What manufacturing challenges are unique to bispecific antibodies?'
201
+
pqa --temperature 0.5 ask 'What is PaperQA2?'
200
202
```
201
203
202
204
You can view all settings with `pqa view`. Another useful thing is to change to other templated settings - for example `fast` is a setting that answers more quickly and you can see it with `pqa -s fast view`
pqa -s my_new_settings ask 'What manufacturing challenges are unique to bispecific antibodies?'
215
+
pqa -s my_new_settings ask 'What is PaperQA2?'
214
216
```
215
217
216
218
If you run `pqa` with a command which requires a new indexing, say if you change the default chunk_size, a new index will automatically be created for you.
217
219
218
220
```bash
219
-
pqa --parsing.chunk_size 5000 ask 'What manufacturing challenges are unique to bispecific antibodies?'
221
+
pqa --parsing.chunk_size 5000 ask 'What is PaperQA2?'
220
222
```
221
223
222
224
You can also use `pqa` to do full-text search with use of LLMs view the search command. For example, let's save the index from a directory and give it a name:
@@ -262,7 +264,7 @@ If you are hitting rate limits, say with the OpenAI Tier 1 plan, you can add the
262
264
For each OpenAI tier, a pre-built setting exists to limit usage.
263
265
264
266
```bash
265
-
pqa --settings 'tier1_limits' ask 'Are there nm scale features in thermoelectric materials?'
267
+
pqa --settings 'tier1_limits' ask 'What is PaperQA2?'
266
268
```
267
269
268
270
This will limit your system to use the [tier1_limits](paperqa/configs/tier1_limits.json),
@@ -271,7 +273,7 @@ and slow down your queries to accommodate.
271
273
You can also specify them manually with any rate limit string that matches the specification in the [limits](https://limits.readthedocs.io/en/stable/quickstart.html#rate-limit-string-notation) module:
272
274
273
275
```bash
274
-
pqa --summary_llm_config '{"rate_limit": {"gpt-4o-2024-11-20": "30000 per 1 minute"}}' ask 'Are there nm scale features in thermoelectric materials?'
276
+
pqa --summary_llm_config '{"rate_limit": {"gpt-4o-2024-11-20": "30000 per 1 minute"}}' ask 'What is PaperQA2?'
275
277
```
276
278
277
279
Or by adding into a `Settings` object, if calling imperatively:
@@ -280,7 +282,7 @@ Or by adding into a `Settings` object, if calling imperatively:
280
282
from paperqa import Settings, ask
281
283
282
284
answer_response = ask(
283
-
"What manufacturing challenges are unique to bispecific antibodies?",
285
+
"What is PaperQA2?",
284
286
settings=Settings(
285
287
llm_config={"rate_limit": {"gpt-4o-2024-11-20": "30000 per 1 minute"}},
286
288
summary_llm_config={"rate_limit": {"gpt-4o-2024-11-20": "30000 per 1 minute"}},
@@ -296,7 +298,7 @@ PaperQA2's full workflow can be accessed via Python directly:
296
298
from paperqa import Settings, ask
297
299
298
300
answer_response = ask(
299
-
"What manufacturing challenges are unique to bispecific antibodies?",
0 commit comments