Index

public.chatbot_conversation_messages_citations

Description

Stores citations associated with chatbot conversation messages. Multiple citations can be associated with a single message. Citations may be returned in a conversation if the chatbot configuration use_azure_search is true.

Columns

Name Type Default Nullable Children Parents Comment
citation_number integer false The indexing number of the citation in the message, citation_number=1 corresponds to “doc1” in chatbot_conversation_messages.message.
content varchar(255) false The cited content. The chunk of material that was passed to the LLM.
conversation_id uuid false public.chatbot_conversations ID of the chatbot conversation that uses this citation.
conversation_message_id uuid false public.chatbot_conversation_messages ID of the chatbot conversation message this citation is used in / associated with.
course_material_chapter_number integer true The number of the course material chapter where the cited document is. Can be null if the cited document is not course material or does not belong to any chapter.
created_at timestamp with time zone now() false Timestamp when the record was created.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
document_url varchar(255) false The URL of the cited page/document.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
title varchar(255) false The title of the cited page/document.
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.

Constraints

Name Type Definition
chatbot_conversation_messages_cita_conversation_message_id_fkey FOREIGN KEY FOREIGN KEY (conversation_message_id) REFERENCES chatbot_conversation_messages(id) ON DELETE CASCADE
chatbot_conversation_messages_citations_conversation_id_fkey FOREIGN KEY FOREIGN KEY (conversation_id) REFERENCES chatbot_conversations(id) ON DELETE CASCADE
chatbot_conversation_messages_citations_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
chatbot_conversation_messages_citations_pkey CREATE UNIQUE INDEX chatbot_conversation_messages_citations_pkey ON public.chatbot_conversation_messages_citations USING btree (id)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.chatbot_conversation_messages_citations FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls