Profile
Retrieve chunk results
Retrieve the top-k most relevant user snippets for grounding conversations, reasoning, or retrieval-augmented generation (RAG).
POST /chunks
This endpoint searches across all data ingested for a user — including events, documents, and summaries — and returns excerpts ranked by semantic relevance.
Purpose
Use this endpoint when your agent or model needs contextual grounding based on a user’s history or profile.
The results can be embedded directly into LLM prompts to personalize reasoning and improve factual recall.
Typical use cases include:
Chat memory retrieval for ongoing conversations.
Personalized RAG pipelines in assistants or copilots.
Cross-tool reasoning and summarization tasks.
Endpoint
Headers
Request Body
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Unique ID of the user whose memory to retrieve. |
| array | Yes | Conversation history to anchor the retrieval query. |
| integer | Optional | Number of relevant snippets to return. Default: |
Conversation Object
Each element of conversation represents one message in the context window.
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | One of |
| string | Yes | Message text content. |
Example Request
Example cURL
Example Response
Response Fields
Field | Type | Description |
|---|---|---|
| array | List of retrieved memory snippets ranked by relevance. |
| string | Unique ID linking to the source record (document or event). |
| string | Extracted text segment relevant to the query. |
| number | Similarity score between 0–1 (higher = more relevant). |
Behavior
Retrieval results are ranked using Fastino’s adaptive user-specific embeddings.
Results include both event and document excerpts where relevant.
top_kcontrols the number of snippets returned (defaults to 5, max 20).Retrieved context can be used for:
Model grounding in RAG pipelines.
User-aware reasoning and prompt initialization.
Personalized summarization or decision support.
Error Responses
HTTP Code | Error Code | Description |
|---|---|---|
|
| Missing |
|
| Invalid or missing API key. |
|
| The user doesn’t exist in your workspace. |
|
| Internal processing failure — retry later. |
Example:
Example Implementation (Python)
Best Practices
Keep
top_kbetween 3–8 for optimal LLM prompt context.Combine retrieved snippets with
/summaryresults for hybrid reasoning.Filter or rerank retrieved chunks in your app for domain-specific weighting.
Log retrieved
chunk_ids if you need traceability between user data and responses.Avoid sending empty or truncated
conversationarrays — include sufficient context.
Related Endpoints
Endpoint | Description |
|---|---|
POST | Ask a natural-language question about the user. |
GET | Retrieve a deterministic summary for user context. |
POST | Add new data for retrieval. |
Summary:
Use POST /chunks to retrieve the most relevant user memory snippets for RAG workflows.
This endpoint powers Fastino’s context-grounded reasoning — allowing agents to access personalized, user-specific information instantly and deterministically.
Join our Discord Community