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__conversation_message_id_not_null n NOT NULL conversation_message_id
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_citation_citation_number_not_null n NOT NULL citation_number
chatbot_conversation_messages_citation_conversation_id_not_null n NOT NULL conversation_id
chatbot_conversation_messages_citations_content_not_null n NOT NULL content
chatbot_conversation_messages_citations_conversation_id_fkey FOREIGN KEY FOREIGN KEY (conversation_id) REFERENCES chatbot_conversations(id) ON DELETE CASCADE
chatbot_conversation_messages_citations_created_at_not_null n NOT NULL created_at
chatbot_conversation_messages_citations_document_url_not_null n NOT NULL document_url
chatbot_conversation_messages_citations_id_not_null n NOT NULL id
chatbot_conversation_messages_citations_pkey PRIMARY KEY PRIMARY KEY (id)
chatbot_conversation_messages_citations_title_not_null n NOT NULL title
chatbot_conversation_messages_citations_updated_at_not_null n NOT NULL updated_at

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