Find organization axes
This recipe shows you how to discover the best dimensions for organizing your videos and images. The response includes ranked categorization strategies with effectiveness scores, expected groups, and example categories, ready for data-driven organization decisions.
Use cases:
- New collection exploration: Discover natural groupings in videos and images you haven’t categorized yet
- Strategy comparison: Evaluate categorization approaches side by side before committing to a taxonomy
- Organization pipeline: Feed scored axes into a workflow that categorizes every item
Key concepts
- Knowledge store: A persistent store of your videos and images plus the understanding the platform derives from them — spatiotemporal context, a typed ontology, and embeddings — that together enable corpus-level reasoning.
- Instructions: Additional guidance that shapes Jockey’s behavior for a specific domain or task.
- Structured output: A JSON schema you provide with your request. Jockey constrains its output to match your schema, so you retrieve machine-readable results instead of plain text. For a guide on designing schemas and parsing responses, see the Structured output page.
Workflow
This recipe combines three elements: a JSON schema that defines the axis data structure, instructions that give Jockey a specific role and domain guidance, and a prompt that describes what you want evaluated. Jockey reasons across your knowledge store, evaluates possible categorization strategies, and returns ranked results with effectiveness scores. You can adapt this recipe to evaluate different domains or apply different ranking criteria.
Prerequisites
- You’ve already created a knowledge store with at least one item in
readystatus. See the Quickstart page for details. - You’re familiar with the request and response format. See the Create a response page for details.
Complete example
Copy and paste the code below, replacing the placeholders surrounded by <> with your values.
Code explanation
Python
Node.js
To rank organization strategies, call the responses.create method with instructions, a prompt, and a text parameter that describes your result schema.
Parameters:
knowledge_store_id: The unique identifier of the knowledge store to reason over.input: An array of input items. Each item is a message you send to Jockey. This example asks Jockey to recommend the top five categorization strategies and score each on a 0–1 scale.instructions: A per-request system prompt that shapes Jockey’s behavior for a domain or task. This example uses a content strategist role that evaluates categorization strategies.text: An object that specifies the response format. To return structured JSON, set theformatfield: itsschema_field defines the structure the output must match, and itsnamefield identifies the schema. Design the schema to fit your use case; the inline comments in the example describe each field. For the schema rules, see the Structured output page.
Return value: An object of type ResponseObject containing, among other information, the following fields:
id: The unique identifier of the response.knowledge_store_id: The knowledge store this response was generated against.session_id: The session identifier. Pass it in a follow-up request to continue the conversation.status: The status of the response. The possible values arecompleted,failed,in_progress, andincomplete.output: The response output items. Thetextfield of each content part in amessageitem is a JSON string that matches your schema. Parse it withjson.loads(), then iterate theaxesarray to read each ranked strategy.usage: Token usage statistics, including theinput_tokensandoutput_tokensfields.
Example response
The text field inside each content part is a JSON string that matches your schema. After parsing, a typical result looks like this:
Note
Jockey evaluates each axis against the actual content in your knowledge store. Scores and recommendations change depending on the videos you have indexed.
Variations
Change the instructions and prompt to adapt this recipe for different organizational needs.
- Domain-constrained: Set the
instructionsparameter to a team-specific perspective: “marketing strategist,” “education specialist,” or “compliance officer.” - Audience-centric: Change the prompt to “How would different audiences want these videos and images organized?”
- Hierarchical taxonomy: Change the prompt to “Suggest a two-level taxonomy: primary axes and sub-axes for each.”
Jupyter notebook
See also
- Organize a video library - uses organization axes as step 2 of a full workflow
- Structured output - more on JSON Schema responses
- Create a response - API reference for the Responses endpoint