Learn how to create and use groups with Trieve
tag_set
attribute in chunks and groups, to categorize and label specific chunks, allowing for quick filtering. This lacks many of the higher level functionality around groups, which allow you to organize and search related content at a broader level.
name
: The name of the group. This does not need to be unique.description
: A description of the group and its corresponding chunks.metadata
: A JSON object containing any additional information to associate with chunks in this chunk group.tracking_id
: An optional, unique identifier to assign to this chunk group.tag_set
: A list of strings to categorize chunks within this chunk group.group_tracking_id
field, to sync with external systems. This also means that you can access and search groups using this field.
For example, to fetch all chunks in a group by the group_tracking_id
, use the get chunks in group by tracking ID route.
group_id
is the Trieve generated ids for groups whereas the
group_tracking_id
is a user-assigned tracking_ids for groups. Groups
with group_ids
must be created first and cannot be arbitrarily created.group_ids
or group_tracking_ids
. Specify one or more existing group IDs that the chunks should be placed into, or provide group tracking IDs. If any IDs within the list of group_tracking_ids
do not exist, new groups corresponding to those tracking IDs will be created.
Groups
in the Navbar.group_size
field to specify the number of chunks to fetch for each group.
Similarly, to search within a group, use the group_id
or group_tracking_id
fields to specify which group you want to search in.
positive_group_tracking_ids
: the tracking IDs of groups that serve as positive examples when curating recommendations.negative_group_tracking_ids
: the tracking IDs of groups that serve as negative examples when getting recommendations.group_size
: the number of chunks to be fetched for each group.limit
: the max number of groups (rather than chunks) that should be returned.get_recommended_chunks
route with a filter on group_ids
or group_tracking_ids
.