Classification
How we classify the content in our engine
We use a combination of natural language prompting and structured data validation to perform qualitative content analysis at quantitative scale. This approach allows us to create sophisticated classification schemes that combine the nuanced understanding of LLMs with strict data validation.
The key components of our classification strategy are:
- Natural Language Codebooks: We define our classification criteria in natural language, allowing for rich, nuanced instructions that LLMs can understand and apply consistently.
- Structured Output Enforcement: Using Pydantic models, we strictly define the shape and validation rules for our classification outputs.
- Type Safety: We ensure that all classifications conform to our predefined schemas while allowing the flexibility of natural language interpretation.
Here’s an example of how these components work together:
or with a Pydantic Model
(note that we are using the field and model annotations as prompt instructons and leave the second argument empty)