Skip to content

Instantly share code, notes, and snippets.

View Tostino's full-sized avatar

Adam Brusselback Tostino

View GitHub Profile
@Tostino
Tostino / inkbot_kg_2.txt
Last active May 10, 2024 19:04
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 December 19, 2023 15:37
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 May 1, 2024 09:45
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 May 6, 2024 20:41
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.