Skip to content

Commit

Permalink
Update batch_classification.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnl committed Jan 31, 2024
1 parent 792da1d commit eeb2fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/examples/batch_classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class TagResponse(BaseModel):
predictions: List[Tag]
```

Let's delve deeper into what the `validate_ids` function does. Notice that its purpose is to extract tags from the context and ensure that each ID and name exists in the set of tags. This approach helps minimize hallucinations. If we mistakenly identify either the ID or the tag, an error will be thrown, and the instructor will prompt the language model to retry until the correct item is successfully extracted."""look at what the validate_ids function does. Notice that what it does is pull tags out of the context and verify that every ID and name actually exists in the set of tags. This is a way that allows us to minimize hallucinations since if we incorrectly identify either the ID or the tag, we will throw an error and instructor will make the language model retry until we successfully extract the right item.
Let's delve deeper into what the `validate_ids` function does. Notice that its purpose is to extract tags from the context and ensure that each ID and name exists in the set of tags. This approach helps minimize hallucinations. If we mistakenly identify either the ID or the tag, an error will be thrown, and the instructor will prompt the language model to retry until the correct item is successfully extracted.

```python
@model_validator(mode="after")
Expand Down

0 comments on commit eeb2fb2

Please sign in to comment.