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 / 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 December 15, 2024 03:05
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.
@Tostino
Tostino / inkbot-chunked-summary.txt
Last active January 8, 2025 09:43
Generate a chunked summary 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#>
Please read the provided Original section to understand the context and content. Use this understanding to generate a summary of the Original section, incorporating relevant details and maintaining coherence with the Prior Summary.
Notes:
@Tostino
Tostino / inkbot-one-shot.txt
Last active November 20, 2024 16:28
Generate a one-shot summary 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#>
Please read the provided Original section to understand the context and content. Use this understanding to generate a summary of the Original section. Separate the article into chunks, and sequentially create a summary for each chunk. Focus on summarizing the Original section, ignoring any details about sponsorships/advertisements in the text.
Summarized Sections:
@Tostino
Tostino / pgml_self_contained.sql
Created October 4, 2023 20:11
Self contained example of running some data through Inkbot using pgml
SELECT *
, rtrim(ltrim(replace(pgml.transform(
task => '{
"task": "text-generation",
"model": "TheBloke/Inkbot-13B-8k-0.2-GPTQ",
"use_safetensors": true,
"inject_fused_attention": false,
"device": 1
}'::JSONB,
inputs => ARRAY[
@Tostino
Tostino / chat_inkbot.sh
Created September 23, 2023 12:37
Inkbot example shell script
#!/bin/bash
set -e
cd "$(dirname "$0")/.." || exit
MODEL="${MODEL:-./models/inkbot-13b-4k.Q4_K_M.gguf}"
PROMPT_TEMPLATE=${PROMPT_TEMPLATE:-./inkbot-chat.txt}
USER_NAME="${USER_NAME:-<#user#>}"
AI_NAME="${AI_NAME:-<#bot#>}"
@Tostino
Tostino / inkbot-chat.txt
Created September 23, 2023 12:37
Inkbot example txt
<#meta#>
- Date: 2023-09-22
- Task: knowledge_graph
<#system#>
You are an AI assistant who will help the user with all their information requests.
<#chat#>
<#user#>
Generate a knowledge graph of the below information (an email)
<#user_context#>
FROM THE OFFICE OF SENATOR RICK SCOTT
@Tostino
Tostino / llm_performance.md
Last active November 1, 2023 19:37
Expandable Primitives for Enhanced LLM Performance

Expandable Primitives for Enhanced LLM Performance

Introduction

This project focuses on augmenting the LLM's capabilities by introducing structured primitives to refine its contextual environment and response aptitude. The primary objective is to enhance user experience, reduce latency, and improve the accuracy and relevance of responses.

Assumptions

  • Reliable external data sources are available and accessible.
  • The current LLM architecture allows for the integration of expandable primitives.
  • User experience can be significantly improved by reducing latency and enhancing context awareness.
@Tostino
Tostino / training.json
Last active June 28, 2023 14:56
training state
{
"log_history": [
{
"epoch": 0.0,
"learning_rate": 5e-05,
"loss": 1.6364,
"step": 5
},
{
"epoch": 0.0,
@Tostino
Tostino / uuid_time_nextval.sql
Created January 22, 2021 20:09
PL/PGSQL Function for uuid_time_nextval
CREATE FUNCTION uuid_time_nextval(interval_length int default 60, interval_count int default 65536)
RETURNS uuid
LANGUAGE plpgsql
AS $$
DECLARE
v_i int;
v_prefix_bytes int = 0;
v_time bigint;
v_bytes int[16] = '{}';
v_hex text[16] = '{}';