Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binary examples for Textcat task in spacy-llm #13051

Merged
merged 5 commits into from
Oct 11, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions website/docs/api/large-language-models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,24 @@ supports `.yml`, `.yaml`, `.json` and `.jsonl`.
path = "textcat_examples.json"
```

If you want to perform few-shot learning with a binary classifier (i. e. a text
either should or should not be assigned to a given class), you can provide
positive and negative examples with the POS/NEG label. An example for spam
svlandeg marked this conversation as resolved.
Show resolved Hide resolved
classification:

```json
[
{
"text": "You won the lottery! Wire a fee of 200$ to be able to withdraw your winnings.",
"answer": "POS"
},
{
"text": "Your order #123456789 has arrived",
"answer": "NEG"
}
]
```

rmitsch marked this conversation as resolved.
Show resolved Hide resolved
### REL {id="rel"}

The REL task extracts relations between named entities.
Expand Down