Collections in Tallyfy Answers group similar objects together, like database tables. They…
Find similar objects
The recommendation endpoint lets you find objects similar to a specified reference object.
This similarity search uses vector embeddings to find objects with related characteristics. It’s useful for recommendation systems, content discovery, and finding related items.
Here’s how Tallyfy Answers uses semantic similarity to find related objects:
- Tallyfy converts each object’s text content into vector embeddings (numerical representations)
- When searching for similar objects, Tallyfy compares vector distances
- Objects with closer vector distances are more similar
- Tallyfy ranks results by similarity score from most to least similar
GET /collections/{collection_name}/recommend/{object_id}| Parameter | Type | Required | Description |
|---|---|---|---|
collection_name | string | Yes | Name of the collection to search in |
object_id | string | Yes | ID of the reference object to find similar objects to |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 4 | Maximum number of similar objects to return (1-20) |
A successful request returns a 200 OK status code and a JSON response containing:
{ "results": [ { "id": "product-456", "score": 0.89, "document": { "name": "Bluetooth Speaker", "description": "Portable waterproof speaker with 20-hour battery life", "price": 129.99, "categories": ["electronics", "audio"] } }, { "id": "product-789", "score": 0.72, "document": { "name": "Wireless Earbuds", "description": "Premium noise-canceling earbuds with charging case", "price": 99.99, "categories": ["electronics", "audio"] } } ], "meta": { "limit": 10, "found": 2 }}| Field | Type | Description |
|---|---|---|
results | array | List of similar objects with similarity scores |
results[].id | string | Unique identifier of the similar object |
results[].score | float | Similarity score (0.0-1.0)1 where higher is more similar |
results[].document | object | Full content of the similar object |
meta.limit | integer | Maximum number of results requested |
meta.found | integer | Total number of similar objects found |
| Status | Description |
|---|---|
| 404 | Collection or reference object not found |
| 400 | Invalid parameters or filter syntax |
# Find objects similar to article-123, limit to 5 resultscurl -X GET "https://answers.tallyfy.com/collections/docs/recommend/article-123?limit=5" \ -H "Authorization: Bearer your_api_key"- Product recommendations: “Customers who viewed this also viewed…”
- Content discovery: Finding related articles or documentation
- Similarity matching: Identifying near-duplicate content
- Alternative suggestions: Offering similar options when an item is unavailable
- Start with a lower
min_scorethreshold and adjust based on result quality - Use the
filterparameter to combine similarity with business rules - You’ll get better recommendations if your objects contain rich, descriptive text
- Include diverse object attributes to improve similarity matching accuracy
Retrieve a specific object from a Tallyfy Answers collection using its unique identifier…
Objects are JSON data records in Tallyfy Answers that belong to collections. They can be…
Tallyfy Answers search combines AI semantic understanding with traditional keyword matching to…
-
Cosine similarity scoring where perfect match equals 1.0, high similarity above 0.8, low below 0.5 ↩
Was this helpful?
About Tallyfy
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks