You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, thanks for making cozodb. It seems really cool.
I'm working on a project where I store a bunch of documents in a database and do similarity search across them.
the idea is it is meant to then integrate with an llm for both question answering and 'smart' actions similar to openais' plugins system.
A simplified & flattened version of my schema I import data into looks as follows:
-- Stores the original data from the source documents,
CREATE TABLE source_document (
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(),
source_type VARCHAR,
source_name VARCHAR,
source_document_extension VARCHAR,
source_document_version VARCHAR,
last_modified TIMESTAMPZ,
parent_document_id VARCHAR,
vec vector,
self_ref VARCHAR,
metadata JSONB,
);
I am wondering if and how I would use timetravel in cozo to retrieve the latest version of each document at a point in time in history, if such a thing is even possible.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, thanks for making cozodb. It seems really cool.
I'm working on a project where I store a bunch of documents in a database and do similarity search across them.
the idea is it is meant to then integrate with an llm for both question answering and 'smart' actions similar to openais' plugins system.
A simplified & flattened version of my schema I import data into looks as follows:
I am wondering if and how I would use timetravel in cozo to retrieve the latest version of each document at a point in time in history, if such a thing is even possible.
Would I create a stored relation like so?
Also, does timetravel work across multiple joins as well if I provide the same
@ 'NOW'
expression, for example?Thinking it will be really useful to be able to search over only documents in the past for what I am working on.
Any guidance or recommendations are appreciated.
edit: made some corrections; there's also supposed to be a version field but I forgot that.
Beta Was this translation helpful? Give feedback.
All reactions