# migrations

dir: embeddings_queue
filename: 00001-embeddings.sqlite.sql
hash: d3755dfd232be8e8301f4d7fcfb3a486
sql:
CREATE TABLE embeddings_queue (
    seq_id INTEGER PRIMARY KEY,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    operation INTEGER NOT NULL,
    topic TEXT NOT NULL,
    id TEXT NOT NULL,
    vector BLOB,
    encoding TEXT,
    metadata TEXT
);


dir: sysdb
filename: 00001-collections.sqlite.sql
hash: 38352d725ad1c16074fac420b22b4633
sql:
CREATE TABLE collections (
    id TEXT PRIMARY KEY,
    name TEXT NOT NULL,
    topic TEXT NOT NULL,
    UNIQUE (name)
);

CREATE TABLE collection_metadata (
    collection_id TEXT REFERENCES collections(id) ON DELETE CASCADE,
    key TEXT NOT NULL,
    str_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (collection_id, key)
);


dir: sysdb
filename: 00002-segments.sqlite.sql
hash: 2913cb6a503055a95f625448037e8912
sql:
CREATE TABLE segments (
    id TEXT PRIMARY KEY,
    type TEXT NOT NULL,
    scope TEXT NOT NULL,
    topic TEXT,
    collection TEXT REFERENCES collection(id)
);

CREATE TABLE segment_metadata (
    segment_id TEXT  REFERENCES segments(id) ON DELETE CASCADE,
    key TEXT NOT NULL,
    str_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (segment_id, key)
);


dir: metadb
filename: 00001-embedding-metadata.sqlite.sql
hash: 2b4cf52c4bb2676e21d6860a4409f856
sql:
CREATE TABLE embeddings (
    id INTEGER PRIMARY KEY,
    segment_id TEXT NOT NULL,
    embedding_id TEXT NOT NULL,
    seq_id BLOB NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UNIQUE (segment_id, embedding_id)
);

CREATE TABLE embedding_metadata (
    id INTEGER REFERENCES embeddings(id),
    key TEXT NOT NULL,
    string_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (id, key)
);

CREATE TABLE max_seq_id (
    segment_id TEXT PRIMARY KEY,
    seq_id BLOB NOT NULL
);

CREATE VIRTUAL TABLE embedding_fulltext USING fts5(id, string_value);


dir: metadb
filename: 00002-embedding-metadata.sqlite.sql
hash: 12a570f7121b3a8ce750a2a7c36da20f
sql:
-- SQLite does not support adding check with alter table, as a result, adding a check
-- involve creating a new table and copying the data over. It is over kill with adding
-- a boolean type column. The application write to the table needs to ensure the data
-- integrity.
ALTER TABLE embedding_metadata ADD COLUMN bool_value INTEGER


dir: metadb
filename: 00003-full-text-tokenize.sqlite.sql
hash: f97ad6334aeaa8f419f01110b648b97a
sql:
CREATE VIRTUAL TABLE embedding_fulltext_search USING fts5(string_value, tokenize='trigram');
INSERT INTO embedding_fulltext_search (rowid, string_value) SELECT rowid, string_value FROM embedding_metadata;
DROP TABLE embedding_fulltext;


# embeddings_queue

created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1afec-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "The Myers-Briggs Type Indicator (MBTI)\u2014also referred to as the \u201cMyers-Briggs personality test\u201d or simply the \u201cMyers-Briggs test\u201d\u2014is a self-reported questionnaire. The test helps people assess their personality using four specific dichotomies, or scales: introversion-extraversion, sensing-intuition, thinking-feeling and judging-perceiving.\nThe MBTI was first developed in the 1940s by Isabel Briggs Myers and her mother Katharine Cook Briggs, and it\u2019s based on psychologist Carl Jung\u2019s theory of psychological types. The purpose of the test is to \u201cmake the theory of psychological types described by C.G. Jung understandable and useful in people\u2019s lives,\u201d according to the Myers & Briggs Foundation. In other words, the MTBI is intended to give clarity and understanding of a person\u2019s personality type in a practical way.\nMyers and Briggs first tested friends and family to collect data, workshop the questions and determine how to weigh each answer. In 1951, more than 5,000 medical students across 45 medical schools used the MBTI to help determine which areas of medicine in which they would specialize. Since then, the questionnaire has been used to help people both in and outside the workplace learn more about their personality and the personalities of the people around them.\nThere are 16 personality types in the MBTI, all of which include a letter for each side of the four scales the person aligns with most. Letters always follow the same order, and scales are abbreviated using the following letters:\nIntroversion-extraversion is represented by I or E; Sensing-intuition is represented by S or N; Thinking-feeling is represented by T or F; Judging-perceiving is represented by J or P\nEach of the scales operates as a spectrum. Although a personality may not fall perfectly into one type, the four-letter type code represents the side of each of the four scales a person most closely fits.\nFor example, a person who leans toward introversion, intuition, thinking and judging would be considered personality type INTJ. Naturally, there are 15 other personality permutations across these four spectrums.\nTo determine a person\u2019s four-letter personality code, the MBTI asks questions to help determine which sides of the four scales they most closely fit.\n1. Extraversion-Introversion:\nThis scale helps a person understand where they put their attention and how they get their energy. \u201cExtraversion refers to the tendency to be outgoing and action-oriented while enjoying social interactions and feeling more energized as a result. Introversion lies on the opposite end of the scale and reflects the tendency to be more thought-oriented and withdrawn,\u201d says Vitelli. However, introversion doesn\u2019t always mean the same thing as shy. Introversion can also indicate someone who enjoys \u201cliving in their head,\u201d reflecting on ideas, thoughts or memories. These types may enjoy company in small groups rather than large crowds and are often comfortable being alone.\nOther common traits of extraverts include:\nFeeling comfortable in groups\nBeing popular or having a large friend group\nNot thinking something over before taking action\nCommon traits of introverts include:\nAvoiding action by overthinking and/or contemplating\nFeeling removed from the outside world"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b082-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "2. Sensing-Intuition\n\nThis scale examines how people take in information from the world around them. \u201cPeople who prefer sensing tend to be more reality-based and depend on their own senses and what they can learn from hands-on experience,\u201d says Vitelli. \u201cIntuition [type] is more likely to depend on their impressions of the world around them and is more likely to rely on inner feelings to make conclusions.\u201d\n\nCommon traits of sensing personalities include:"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b096-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "Remembering accurate snapshots of events\nBeing a fact-based problem solver\nA preference for a realistic \u201cbottom line\u201d approach\nValuing experience more than words and/or symbols\nOverlooking potential possibilities due to overanalyzing facts\nCommon traits of intuition personalities include:"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b0b4-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "\u201cReading between the lines\u201d\nAn interest in new, different experiences\nBouncing between possible scenarios\nValuing impressions, metaphors and symbols more than lived experience\nA difficulty bringing possibilities to reality"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b0be-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "3. Thinking-Feeling\nWith this scale, the idea is to understand whether a person focuses more on information as it relates to their five senses or on patterns and interpretations. \u201cPeople scoring highly on thinking tend to be more logic-based and dependent on facts and objective information,\u201d Vitelli adds. \u201cFeeling individuals are more likely to depend on emotions to conclude people and events.\u201d\n\nThinking personalities commonly display as:"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b0d2-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "Enjoying fields where logic is key\nNoticing errors or inconsistencies\nSearching for logical solutions to problems\nA desire to be fair and make decisions based on logic\nBelieving in direct truth-telling\nNot always accounting for people\u2019s emotions or experiences\nBeing task oriented and appearing indifferent or uncaring\nFeeling personalities typically present as:"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b0dc-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "Enjoying fields involving people or communications\nWanting harmony and becoming nervous around conflict\nHaving concern for others\nBeing compassionate and making emotion-based decisions\nValuing people\u2019s emotions and believing in delivering news with tact\nNot always communicating difficult truths directly\nAppearing indirect, idealistic, or emotional"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b0fa-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "4.Judging-Perceiving\nThis scale assesses whether a person prefers more structure in their life or if they\u2019re open to a more flexible lifestyle. \u201cPeople high on judging are more rigid and inflexible and prefer more structured environments,\u201d says Vitelli. \u201cOn the other hand, people high on perceiving tend to be more flexible, open-minded and spontaneous.\u201d\n\nCommon displays of judging personalities may include:"}


created_at: 2023-10-13 04:50:47
topic: persistent://default/default/8c3ee9e2-1f68-427e-9c86-410979a15b2e
id: 12e1b118-6984-11ee-a2a7-2ad4b4b91796
encoding: FLOAT32
metadata:
{"source": "document_0.txt", "chroma:document": "Enjoying when things are decided\nBeing task oriented\nEnjoying to-do lists\nHaving a \u201cwork before play\u201d attitude\nPlanning ahead to avoid rushing or procrastination\nBeing highly goal oriented, but sometimes missing information due to narrow focus\nPerceiving personalities can appear as:\n\nBeing open-minded\nBeing casual or not one to make plans\nMixing work with play\nBeing productive in bursts of energy\nReceiving added stimulation from pressure or deadlines\nHaving difficulty making decisions"}


# embedding_metadata

key: chroma:document
string_value:
The Myers-Briggs Type Indicator (MBTI)—also referred to as the “Myers-Briggs personality test” or simply the “Myers-Briggs test”—is a self-reported questionnaire. The test helps people assess their personality using four specific dichotomies, or scales: introversion-extraversion, sensing-intuition, thinking-feeling and judging-perceiving.
The MBTI was first developed in the 1940s by Isabel Briggs Myers and her mother Katharine Cook Briggs, and it’s based on psychologist Carl Jung’s theory of psychological types. The purpose of the test is to “make the theory of psychological types described by C.G. Jung understandable and useful in people’s lives,” according to the Myers & Briggs Foundation. In other words, the MTBI is intended to give clarity and understanding of a person’s personality type in a practical way.
Myers and Briggs first tested friends and family to collect data, workshop the questions and determine how to weigh each answer. In 1951, more than 5,000 medical students across 45 medical schools used the MBTI to help determine which areas of medicine in which they would specialize. Since then, the questionnaire has been used to help people both in and outside the workplace learn more about their personality and the personalities of the people around them.
There are 16 personality types in the MBTI, all of which include a letter for each side of the four scales the person aligns with most. Letters always follow the same order, and scales are abbreviated using the following letters:
Introversion-extraversion is represented by I or E; Sensing-intuition is represented by S or N; Thinking-feeling is represented by T or F; Judging-perceiving is represented by J or P
Each of the scales operates as a spectrum. Although a personality may not fall perfectly into one type, the four-letter type code represents the side of each of the four scales a person most closely fits.
For example, a person who leans toward introversion, intuition, thinking and judging would be considered personality type INTJ. Naturally, there are 15 other personality permutations across these four spectrums.
To determine a person’s four-letter personality code, the MBTI asks questions to help determine which sides of the four scales they most closely fit.
1. Extraversion-Introversion:
This scale helps a person understand where they put their attention and how they get their energy. “Extraversion refers to the tendency to be outgoing and action-oriented while enjoying social interactions and feeling more energized as a result. Introversion lies on the opposite end of the scale and reflects the tendency to be more thought-oriented and withdrawn,” says Vitelli. However, introversion doesn’t always mean the same thing as shy. Introversion can also indicate someone who enjoys “living in their head,” reflecting on ideas, thoughts or memories. These types may enjoy company in small groups rather than large crowds and are often comfortable being alone.
Other common traits of extraverts include:
Feeling comfortable in groups
Being popular or having a large friend group
Not thinking something over before taking action
Common traits of introverts include:
Avoiding action by overthinking and/or contemplating
Feeling removed from the outside world


key: chroma:document
string_value:
2. Sensing-Intuition

This scale examines how people take in information from the world around them. “People who prefer sensing tend to be more reality-based and depend on their own senses and what they can learn from hands-on experience,” says Vitelli. “Intuition [type] is more likely to depend on their impressions of the world around them and is more likely to rely on inner feelings to make conclusions.”

Common traits of sensing personalities include:


key: chroma:document
string_value:
Remembering accurate snapshots of events
Being a fact-based problem solver
A preference for a realistic “bottom line” approach
Valuing experience more than words and/or symbols
Overlooking potential possibilities due to overanalyzing facts
Common traits of intuition personalities include:


key: chroma:document
string_value:
“Reading between the lines”
An interest in new, different experiences
Bouncing between possible scenarios
Valuing impressions, metaphors and symbols more than lived experience
A difficulty bringing possibilities to reality


key: chroma:document
string_value:
3. Thinking-Feeling
With this scale, the idea is to understand whether a person focuses more on information as it relates to their five senses or on patterns and interpretations. “People scoring highly on thinking tend to be more logic-based and dependent on facts and objective information,” Vitelli adds. “Feeling individuals are more likely to depend on emotions to conclude people and events.”

Thinking personalities commonly display as:


key: chroma:document
string_value:
Enjoying fields where logic is key
Noticing errors or inconsistencies
Searching for logical solutions to problems
A desire to be fair and make decisions based on logic
Believing in direct truth-telling
Not always accounting for people’s emotions or experiences
Being task oriented and appearing indifferent or uncaring
Feeling personalities typically present as:


key: chroma:document
string_value:
Enjoying fields involving people or communications
Wanting harmony and becoming nervous around conflict
Having concern for others
Being compassionate and making emotion-based decisions
Valuing people’s emotions and believing in delivering news with tact
Not always communicating difficult truths directly
Appearing indirect, idealistic, or emotional


key: chroma:document
string_value:
4.Judging-Perceiving
This scale assesses whether a person prefers more structure in their life or if they’re open to a more flexible lifestyle. “People high on judging are more rigid and inflexible and prefer more structured environments,” says Vitelli. “On the other hand, people high on perceiving tend to be more flexible, open-minded and spontaneous.”

Common displays of judging personalities may include:


key: chroma:document
string_value:
Enjoying when things are decided
Being task oriented
Enjoying to-do lists
Having a “work before play” attitude
Planning ahead to avoid rushing or procrastination
Being highly goal oriented, but sometimes missing information due to narrow focus
Perceiving personalities can appear as:

Being open-minded
Being casual or not one to make plans
Mixing work with play
Being productive in bursts of energy
Receiving added stimulation from pressure or deadlines
Having difficulty making decisions


