Practical overview
When it fits
Use it when application code needs to turn user-session activity into personalized batches from content held in a vector database.
Who it is for
- Python application developers adding personalized recommendations to an app.
- Teams using vector databases such as Pinecone or Weaviate for application content.
Documented uses
- Connect an application's vector database to FirstBatch personalization.
- Create persistent-ID or temporary user sessions.
- Return content batches tailored to session embeddings.
- Send likes or clicks as signals that update user embeddings.
Requirements & limits
- Requires Python 3.9 or later and API keys for FirstBatch and the selected vector database.
- The README provides a concrete Pinecone setup example; repository topics also name Weaviate, Chroma, Supabase and Typesense.
- The repository lists an MIT license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up a Pinecone-backed recommendation session
Connect a Pinecone index to FirstBatch and request a personalized content batch.
Before you start
- Python 3.9 or later
- FirstBatch API key
- Pinecone API key and environment
- A Pinecone index
Steps
Install the package with the command below.
pip install firstbatchInitialize Pinecone and open the index to use.
Create a FirstBatch instance with its API key and configuration, then register the index as a vector database.
Create a session with a selected algorithm and the registered vector database ID, then call
batchfor recommendations.
Expected outcome
The example returns item IDs and a personalized batch for the session.
Guide limitations
- The example does not document how to create or populate the Pinecone index.
- It does not specify the available algorithms beyond showing
AlgorithmLabel.AI_AGENTSas an example.
Use a like signal to update a session embedding
Send a user's like for an item from a returned batch as a personalization signal.
Before you start
- A configured FirstBatch instance and vector database
- An active session
- Item IDs from a previously returned batch
Steps
Request a batch for the session and retain its item IDs.
Select the ID corresponding to the item the user liked.
Call
add_signalwith the session, aLIKEuser action and the selected item ID.
Expected outcome
The like is sent as a signal to shape the user's embedding.
Guide limitations
- The example demonstrates a like signal; it does not give detailed handling for other signal types.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- firstbatchxyz/firstbatch-sdk · Official homepage title · retained in its source language

