Documenting the seven tables and their related methods/functions

Documenting the seven tables and their related methods/functions:

CONVERSATIONAL_TABLE: plain table

  • write_conversational_memory

called at the beginning of a conversation for a query and the end for an answer

  • read_conversational_memory

called at the beginning of a conversation

KNOWLEDGE_BASE_TABLE: table with an embedding column

  • write_knowledge_base

called by fetch_and_save_paper_to_kb_db, a tool called on demand by llm

  • read_knowledge_base

called at the beginning of a conversation

WORKFLOW_TABLE: table with an embedding column

  • write_workflow

called at the end of a conversation

  • read_workflow

called at the beginning of a conversation

TOOLBOX_TABLE: table with an embedding column

  • write_toolbox

called by register_tool

  • read_toolbox

called at the beginning of a conversation

TOOL_LOG_TABLE: plain table

  • write_tool_log

called after each tool call

  • read_tool_logs

not used

ENTITY_TABLE: table with an embedding column

  • write_entity

called at the beginning and the end of a conversation to record entities found in the query and answer

  • read_entity

called at the beginning of a conversation

SUMMARY_TABLE: table with an embedding column

  • write_summary

called by summarise_context_window

full_content is written as part of the metadata in the SUMMARY_TABLE, but it is never used. When a full conversation is needed, read_conversations_by_summary_id will get it from CONVERSATIONAL_TABLE based on summary_id

  • read_summary_context

called at the beginning of a conversation to get a list of relevant summary ids and summaries

  • read_summary_memory and read_conversations_by_summary_id

called by expand_summary, a tool called on demand by llm.

The former is to get a summary based on a summary id and the latter is to get the full conversation.

1 Like