Index

public.chatbot_configurations

Description

Tells how a chatbot on a course should behave.

Columns

Name Type Default Nullable Children Parents Comment
chatbot_name varchar(1024) false This name will be used when presenting the chatbot to the students.
course_id uuid false public.courses The course this chatbot is appearing on
created_at timestamp with time zone now() false Timestamp when the record was created.
daily_tokens_per_user integer false The number of tokens a student can use per day. Limits the number of messages a student can send to the chatbot based on the complexity of the messages and responses.
default_chatbot boolean false false If true, this is the chatbot that is accessible from the balloon on the corner of the course material. If false, this can be some other chatbot related to the course, such as a chatbot visible within the text of the course material.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
enabled_to_students boolean false false If enabled, students can use the chatbot..
frequency_penalty real 0.0 false The frequency penalty parameter for the chatbot. The value should be between 0 and 1.
hide_citations boolean false false Whether to show citations to user in the chatbot interface. If true, citations will be hidden on the frontend.
id uuid uuid_generate_v4() false public.chatbot_conversations A unique, stable identifier for the record.
initial_message varchar(32376) false The message the chatbot will send to the student when they open the chat for the first time.
maintain_azure_search_index boolean false false If, true, whenever a page is created, updated, or deleted, the the system will sync its contents to the the Azure Search index. If false, the chatbot will not update the Azure Search index. Note that at the moment the system does not delete unused indexes, so yoy want to optimize index costs, you may want to delete the indexes from the Azure portal.
max_completion_tokens integer 600 false The max. number of tokens the thinking LLM is allowed to use in generating the response, including output tokens and reasoning tokens. Only used with reasoning models.
model_id uuid false public.chatbot_configurations_models The LLM to use in this chatbot configuration. The model choice affects the some of the behaviour of the chatbot.
presence_penalty real 0.0 false The presence penalty parameter for the chatbot. The value should be between 0 and 1.
prompt varchar(32376) false The prompt that the chatbot will use to start the conversation.
reasoning_effort reasoning_effort_level ‘minimal’::reasoning_effort_level false Controls the amount of effort (time, tokens) used in the reasoning phase of response generations. A lower level means the model is more likely to use less tokens in reasoning (thinking). A low reasoning effort level will likely negatively affect how successful the model is in tasks that require complicated planning, reasoning, or complicated tool use. Only used with reasoning models.
response_max_tokens integer 500 false The maximum number of tokens the chatbot can output in a response, i.e. maximum response length in tokens. Only used with non-reasoning models.
temperature real 0.7 false The temperature parameter for the chatbot. The higher the temperature, the more creative the chatbot will be. The value should be between 0 and 1.
thinking_model boolean false public.chatbot_configurations_models
top_p real 1.0 false The top_p parameter for the chatbot. The higher the top_p, the more creative the chatbot will be. The value should be between 0 and 1.
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.
use_azure_search boolean false false Whether to use Azure Search for chatbot search. Requires maintain_azure_search_index to be true.
use_semantic_reranking boolean false false Whether to use semantic reranking for chatbot search. Requires the feature to be enabled in Azure.
verbosity verbosity_level ‘medium’::verbosity_level false Verbosity of the generated response, with a higher level meaning that the model is more likely to generate longer responses and vice versa. Only used with reasoning models.
weekly_tokens_per_user integer false The number of tokens a student can use per week. Limits the number of messages a student can send to the chatbot based on the complexity of the messages and responses.

Constraints

Name Type Definition
chatbot_configurations_chatbot_name_not_null n NOT NULL chatbot_name
chatbot_configurations_course_id_fkey FOREIGN KEY FOREIGN KEY (course_id) REFERENCES courses(id)
chatbot_configurations_course_id_not_null n NOT NULL course_id
chatbot_configurations_created_at_not_null n NOT NULL created_at
chatbot_configurations_daily_tokens_per_user_not_null n NOT NULL daily_tokens_per_user
chatbot_configurations_default_chatbot_not_null n NOT NULL default_chatbot
chatbot_configurations_enabled_to_students_not_null n NOT NULL enabled_to_students
chatbot_configurations_frequency_penalty_not_null n NOT NULL frequency_penalty
chatbot_configurations_hide_citations_not_null n NOT NULL hide_citations
chatbot_configurations_id_not_null n NOT NULL id
chatbot_configurations_initial_message_not_null n NOT NULL initial_message
chatbot_configurations_maintain_azure_search_index_if_use_azure CHECK CHECK (((use_azure_search = false) OR (maintain_azure_search_index = true)))
chatbot_configurations_maintain_azure_search_index_not_null n NOT NULL maintain_azure_search_index
chatbot_configurations_max_completion_tokens_not_null n NOT NULL max_completion_tokens
chatbot_configurations_model_not_null n NOT NULL model_id
chatbot_configurations_models_fk FOREIGN KEY FOREIGN KEY (model_id, thinking_model) REFERENCES chatbot_configurations_models(id, thinking)
chatbot_configurations_pkey PRIMARY KEY PRIMARY KEY (id)
chatbot_configurations_presence_penalty_not_null n NOT NULL presence_penalty
chatbot_configurations_prompt_not_null n NOT NULL prompt
chatbot_configurations_reasoning_effort_not_null n NOT NULL reasoning_effort
chatbot_configurations_response_max_tokens_not_null n NOT NULL response_max_tokens
chatbot_configurations_temperature_not_null n NOT NULL temperature
chatbot_configurations_thinking_model_not_null n NOT NULL thinking_model
chatbot_configurations_top_p_not_null n NOT NULL top_p
chatbot_configurations_updated_at_not_null n NOT NULL updated_at
chatbot_configurations_use_azure_search_not_null n NOT NULL use_azure_search
chatbot_configurations_use_semantic_reranking_not_null n NOT NULL use_semantic_reranking
chatbot_configurations_verbosity_not_null n NOT NULL verbosity
chatbot_configurations_weekly_tokens_per_user_not_null n NOT NULL weekly_tokens_per_user

Indexes

Name Definition
chatbot_configurations_only_one_default CREATE UNIQUE INDEX chatbot_configurations_only_one_default ON public.chatbot_configurations USING btree (course_id, deleted_at) NULLS NOT DISTINCT WHERE (default_chatbot IS TRUE)
chatbot_configurations_pkey CREATE UNIQUE INDEX chatbot_configurations_pkey ON public.chatbot_configurations USING btree (id)

Triggers

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

Relations

er

Generated by tbls