Skip to content

Instantly share code, notes, and snippets.

View twmbx's full-sized avatar
🇿🇲

Twaambo Haamucenje twmbx

🇿🇲
View GitHub Profile

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

<?php
date_default_timezone_set('Africa/Nairobi');
// set up db connection
include("connection.php")
$TenantTransactionId = $_GET["TransactionType"];
$SESSIONID = $_GET["SESSIONID"];
$SERVICECODE = $_GET["SERVICECODE"];
$ApplicationID = $_GET["ApplicationID"];
$USSD_string = $_GET["USSD_string"];
@3n21c0
3n21c0 / main.go
Last active June 21, 2026 12:51
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@karllhughes
karllhughes / compose.yml
Last active April 8, 2021 06:57
laravel php docker compose file
version: "2"
services:
web:
image: karllhughes/php-fpm-mysql:latest
restart: always
links:
- database
- redis
env_file:
@bekarice
bekarice / filter-wc-orders-by-gateway.php
Last active August 3, 2023 13:37
Filters WooCommerce Orders by Payment Gateway Used
<?php
/**
* Plugin Name: Filter WooCommerce Orders by Payment Method
* Plugin URI: http://skyverge.com/
* Description: Filters WooCommerce orders by the payment method used :)
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: wc-filter-orders-by-payment
*
@daverockz
daverockz / ussdAppSample.php
Created December 4, 2016 23:26
sample php ussd app
<?php
$ussdRequest = json_decode(@file_get_contents('php://input'));
$ussdResponse = new stdclass;
if ($ussdRequest != NULL)
switch ($ussdRequest->Type) {
case 'Initiation':
$ussdResponse->Message =
<?php
$ussdRequest = json_decode(@file_get_contents('php://input'));
if($ussdRequest != NULL);
$ussdResponse = new stdClass;
switch($ussdRequest->Type){
case "Initiation":
@electerious
electerious / Caddyfile
Created August 20, 2016 18:15
Most complete list of mime types in the correct format for the Caddy mime directive
mime {
.atom application/atom+xml
.json application/json
.map application/json
.topojson application/json
.jsonld application/ld+json
.rss application/rss+xml
.geojson application/vnd.geo+json
.rdf application/xml
.xml application/xml
@abel-masila
abel-masila / index.php
Created July 13, 2016 09:16
A simple USSD registration application written in PHP
<?php
/* Simple sample USSD registration application
* USSD gateway that is being used is Africa's Talking USSD gateway
*/
// Print the response as plain text so that the gateway can read it
header('Content-type: text/plain');
/* local db configuration */
$dsn = 'mysql:dbname=dbname;host=127.0.0.1;'; //database name
@andrejIka
andrejIka / awesm.md
Created June 10, 2016 19:12 — forked from matula/awesm.md
Awesome PHP stuff in one Gist