Skip to content

Instantly share code, notes, and snippets.

View Tostino's full-sized avatar

Adam Brusselback Tostino

  • Retired, for now.
  • Tampa, FL
View GitHub Profile
@Tostino
Tostino / word_token_to_character_token.py
Last active September 20, 2024 20:02
Teach model to decompose word-level tokens into the constituant characters
import json
import random
import string
from typing import List, Dict, Tuple, Callable, Optional, Any
from dataclasses import dataclass, field
import logging
from collections import defaultdict, Counter
from typing import Tuple
from sentence_transformers import SentenceTransformer
import faiss
@Tostino
Tostino / questions_opportunity_ai.md
Last active August 23, 2024 14:58
Questions for opportunity.ai

Questions for opportunity.ai Interview

Relationship with brainstems.ai

  • What is the exact nature of your relationship with brainstems.ai? Are you a subsidiary, partner, or customer?
  • How does brainstems.ai's blockchain and ML technology specifically apply to your food service solutions?
  • To what extent are you dependent on brainstems.ai for your core technology and operations?

Technology and Implementation

  • Can you provide a detailed explanation of how your ML models work in the context of food service optimization?
  • How do you gather and process data from various stakeholders (manufacturers, operators, brokers, distributors) while ensuring data isolation and privacy?
{"id": 24998, "part": 1, "prompt_date": "2024-05-19", "task": "formalize", "system_prompt": "You are an AI assistant that helps the user find information.", "user_context": "nope i havent watched that yet.....", "instruction": "Rewrite in a more formal manner", "response": "No, I have not viewed that yet."}
{"id": 9016, "part": 1, "prompt_date": "2020-02-03", "task": "gec", "system_prompt": "You are an AI assistant that helps the user find information.", "user_context": "You would not think but when you are just thinking you may have the chance to invet something new and useful for humanity.", "instruction": "Fix errors in this text", "response": "You may not think it, but when you are just thinking, you may have the chance to invent something new and useful for humanity."}
{"id": 59326, "part": 1, "prompt_date": "2026-12-24", "task": "paraphrase", "system_prompt": "Act as an AI assistant that helps people find information. Provide a detailed answer to the user.", "user_context": "This would be a great time f
@Tostino
Tostino / inkbot_training_grammarly_advanced.jsonl
Created July 10, 2024 13:33
Inkbot grammarly - advanced
{"id": 83169, "part": 1, "prompt_date": "2024-12-29", "task": "formalize, neutralize", "system_prompt": "You are an AI assistant that helps the user find information.", "user_context": "You know what would make coding more fun and efficient? If we could laugh and enjoy while we do it! This new way of coding, let's call it 'fun coding' or 'joyful programming', would totally change how we think about writing code. Inspired by those times when you're in stitches from laughter, this kind of coding would bring that joy right into our work! And guess what, TSQL2 is a language that totally gets this idea. It's way cooler and more enjoyable than the boring, traditional ways of coding.", "instruction": "Transform this text into a formal style and neutralize any opinionated language", "response": "There exists an approach to software development which seeks to incorporate elements of enjoyment and engagement into the coding process, thereby potentially increasing productivity and creativity. This methodology, which we
@Tostino
Tostino / inkbot_training_kg_02.json
Created July 10, 2024 13:11
Inkbot training data knowledge graph use - medium
{
"prompt_date":"2022-06-29",
"task":"kg",
"system_prompt":"As an AI assistant, furnish an extensive answer that negates the user's need for supplementary information from external sources.",
"conversation":[
{
"bot":"Link between the nodes: Zeta leads to Eta.",
"user":"Describe the connection between node Zeta and node Eta.",
"user_context":"nodes:\n - id: Alpha\n event: Protracted conflict in Ukraine\n date: Unknown\n - id: Beta\n event: West and the United States supplying Ukraine\n date: Unknown\n - id: Gamma\n event: Distribution of missile defense system to Ukraine\n date: Expected soon\n - id: Delta\n event: Ukrainian special forces running operations inside Russian territory\n date: Unknown\n - id: Epsilon\n event: Guerilla activities in Russian territory\n date: Expected soon\n - id: Zeta\n event: Sanctions causing Russia's first big default\n date: Unknown\n - id: Eta\n event: Russia cooking economic books\n
@Tostino
Tostino / inkbot_training_kg_01.json
Created July 10, 2024 12:56
Inkbot training data knowledge graph use - easy
{
"prompt_date":"2020-03-21",
"task":"kg",
"system_prompt":"As an AI assistant, furnish an extensive answer that negates the user's need for supplementary information from external sources.",
"conversation":[
{
"bot":"high.",
"user":"How confident are we about the connection between Alpha and Beta?",
"user_context":"nodes:\n - id: Alpha\n event: Recognition of essential workers\n date: 2020-03-21\n - id: Beta\n group: Essential workers\n description: People working in grocery stores, big-box stores, gas stations, and pharmacies\n - id: Gamma\n concept: Essential jobs\n description: Jobs that are necessary for society to function\n - id: Delta\n concept: Stigma attached to certain jobs\n description: Idea that jobs with a plastic name tag indicate poor life decisions\n date: Unknown\n - id: Epsilon\n event: Essential workers risking their lives\n date: 2020-03-21\n - id: Zeta\n concept: Class solidarity\n description: Sup
@Tostino
Tostino / inkbot_kg_2.txt
Last active May 31, 2024 11:43
Inkbot knowledge graph (2)
<#meta#>
- Date: 2023-05-16
- Task: kg
<#system#>
You are an AI assistant who will help the user with all their information requests.
<#chat#>
<#user#>
Your task is to construct a comprehensive Temporal Knowledge Graph
1. Read and understand the Document: Familiarize yourself with the essential elements, including (but not limited to) ideas, events, people, organizations, impacts, and key points, along with any explicitly mentioned or inferred dates or chronology
- Pretend the date found in 'Date' is the current date
@Tostino
Tostino / inkbot_kg_1.txt
Last active May 6, 2024 17:30
Inkbot knowledge graph (1)
<#meta#>
- Date: 2023-05-16
- Task: kg
<#system#>
You are an AI assistant who will help the user with all their information requests.
<#chat#>
<#user#>
Create a Knowledge Graph based on the provided document.
<#user_context#>
KYIV, May 16 (Reuters) - Ukraine said on Tuesday it had shot down six Russian Kinzhal missiles in a single night, thwarting a weapon Moscow has touted as a next-generation hypersonic missile that was all but unstoppable.
@Tostino
Tostino / inkbot-chat-example.txt
Created October 5, 2023 13:38
Inkbot chat prompt example
<#meta#>
- Date: 2023-10-05
- Task: chat
<#system#>
You are a conversational AI having a turn based chat with a user.
<#chat#>
<#user#>
Message 1
<#bot#>
Response 1
@Tostino
Tostino / inkbot-summary-of-summaries.txt
Last active July 14, 2024 06:26
Generate a summary-of-summaries prompt example
<#meta#>
- Date: 2023-10-05
- Task: summary
<#system#>
Your main objective is to condense the content of the document into a concise summary, capturing the main points and themes.
<#chat#>
<#user#>
To craft a Final Summary:
1. Read Summarized Sections: Carefully review all the summarized sections of the document. Ensure that you have a clear understanding of the main points, key details, and essential information presented in each section.