Skip to main content

Typing Log Data Schema

Below is the schema for the programming process data collected by the Clover system, focusing on user typing events and line suggestions. This schema captures fine-grained programming behavior, AI-generated suggestions, and user decision-making over time. It is designed to support research into learning, hesitation, trust in AI, and debugging behavior.

How to read this diagram

  • typing_log records every snapshot of code typed by users, and accepted suggestions
  • line_suggestions stores AI-generated code Decision outcomes are tracked in line_suggestions_log (should be deprecated) & typing_log
  • line_suggestions_group groups related suggestions with metadata
  • terminal_logs captures the output of user run terminal sessions
  • All user activity links back to users

Tables

typing_log

Logs user typing events related to line suggestions, including the raw text entered and the event type.

View fields and relationships

  • id: UUID, Primary Key
  • created_at: Timestamp with time zone, The time when the typing event was logged.
  • raw_text: Text, The raw text input by the user.
  • line_suggestion_id: UUID, Foreign Key referencing line_suggestions(id), the suggestion related to the typing event.
  • user_id: UUID, Foreign Key referencing users(id), the user who typed the text.
  • event: Suggestion_event, Enum indicating the type of event (e.g., accepted, rejected).
  • Indexes: Primary Key on id, Foreign Keys on line_suggestion_id, user_id
  • Relationships: Many-to-One with line_suggestions and users
note

For example data please see Logging

line_suggestions

Stores individual line suggestions generated by the AI model, including both correct and incorrect versions, along with metadata such as creation time, group association, and bug percentage.

View fields and relationships

  • id: UUID, Primary Key
  • incorrect_line: Text, The line of code suggested by the AI model that contains an intentional bug.
  • correct_line: Text, The correct version of the line of code.
  • shown_bug: Boolean, Indicates whether the bug was shown to the user.
  • created_at: Timestamp, The time when the suggestion was created.
  • group_id: UUID, Foreign Key referencing line_suggestions_group(id), grouping related suggestions.
  • line_index: Integer, The index of the line in the original code context.
  • bug_percentage: Integer, The percentage of likelihood the the bug suggestion will be shown.
  • Indexes: Primary Key on id, Foreign Key on group_id
  • Relationships: Many-to-One with line_suggestions_group

line_suggestions_group

Contains metadata for groups of line suggestions, including the prompt used, model details, language, and version information.

View fields and relationships

  • id: UUID, Primary Key
  • created_at: Timestamp with time zone, The time when the group was created.
  • prompt: Text, The prompt used to generate the suggestions.
  • model: Text, The AI model used for generating suggestions.
  • vendor: Text, The vendor of the AI model.
  • refined_prompt: Text, The refined version of the prompt after processing.
  • language: Text, The programming language of the suggestions.
  • suggestions: JSONB, A JSON array containing the generated suggestions.
  • filename: Text, The name of the file associated with the suggestions.
  • version: Text, The version of the AI model or system.
  • Indexes: Primary Key on id
  • Relationships: One-to-Many with line_suggestions

line_suggestions_log

will be deprecated

This table should be deprecated in favor of typing_log as much of the data is duplicated, but is still used by the Clover Website.

Records user interactions with line suggestions, including the event type, duration of decision-making, and associated user and class information.

View fields and relationships

  • id: UUID, Primary Key
  • created_at: Timestamp with time zone, The time when the log entry was created.
  • event: Suggestion_event, Enum indicating the type of event (e.g., accepted, rejected).
  • duration: Bigint, The time taken by the user to make a decision.
  • user_id: UUID, Foreign Key referencing users(id), the user who made the decision.
  • line_suggestion_id: UUID, Foreign Key referencing line_suggestions(id), the suggestion involved.
  • class_id: UUID, Foreign Key referencing classes(id), the class context.
  • Indexes: Primary Key on id, Foreign Keys on user_id, line_suggestion_id, class_id
  • Relationships: Many-to-One with users, line_suggestions, and classes

terminal_logs

Captures terminal session logs for users, including start and end times, output, and user association.

View fields and relationships

  • id: Bigint, Primary Key
  • start_time: Timestamp with time zone, The start time of the terminal session.
  • end_time: Timestamp with time zone, The end time of the terminal session.
  • output: Text, The output generated during the terminal session.
  • user_id: UUID, Foreign Key referencing users(id), the user associated with the session.
  • Indexes: Primary Key on id, Foreign Key on user_id
  • Relationships: Many-to-One with users
note

The Logging page has more details on what logs look like in practice. 👉