Skip to content

Instantly share code, notes, and snippets.

View BlackHacked's full-sized avatar
📷
Hello World

Latin BlackHacked

📷
Hello World
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.

"$schema" = 'https://starship.rs/config-schema.json'
format = """
[](red)\
$os\
$username\
[](bg:peach fg:red)\
$directory\
[](bg:yellow fg:peach)\
$git_branch\
@ruvnet
ruvnet / claude-flow-vs-claude-code.md
Last active April 10, 2026 16:22
Architectural Comparison: Claude Flow V3 vs Claude Code TeammateTool

Architectural Comparison: Claude Flow V3 vs Claude Code TeammateTool

Date: 2026-01-25 Analysis: Side-by-side comparison of Claude Flow V3 swarm architecture (developed by rUv) and Claude Code's TeammateTool (discovered in v2.1.19)


Executive Summary

A detailed analysis reveals striking architectural similarities between Claude Flow V3's swarm system and Claude Code's TeammateTool. The terminology differs, but the core concepts, data structures, and workflows are nearly identical.

@rosmur
rosmur / requirementstxt_to_uv_pyprojecttoml.py
Created March 3, 2025 05:20
requirements.txt to uv pyproject.toml dependencies convertor
#!/usr/bin/env python3
"""
Script to convert requirements.txt to dependencies list for pyproject.toml for uv project
Usage:
Execute the script with:
python3 requirementstxt_to_uv_pyprojecttoml.py path/to/requirements.txt
@wwdegroot
wwdegroot / app.py
Created March 1, 2025 08:55
FastApi proxy endpoint
# adapted from https://github.com/fastapi/fastapi/issues/1788
from fastapi import FastAPI
from starlette.requests import Request
from starlette.responses import StreamingResponse
from starlette.background import BackgroundTask
import uvicorn
import httpx
API_KEY = os.getenv('API_KEY')
@qtangs
qtangs / sql_alchemy.py
Last active November 27, 2024 07:01
chainlit.data.SQLAlchemyDataLayer
# https://github.com/qtangs/chainlit/blob/b81f82c9eff86fc9fd6da6f8f9f09ec03d95d8e0/backend/chainlit/data/sql_alchemy_orm.py
import datetime
import json
import logging
import os
import ssl
import uuid
from typing import Any, Callable, Dict, List, Optional, Union, cast
@thevickypedia
thevickypedia / proxy.py
Last active March 24, 2025 08:54
Basic proxy service using FastAPI (asynchronous)
import logging
from http import HTTPStatus
import httpx
import uvicorn.logging
from fastapi import FastAPI, HTTPException, Request, Response
from fastapi.routing import APIRoute
TARGET_URL = "http://127.0.0.1:8080" # Change this to the URL you want to proxy requests to
@walnutwaldo
walnutwaldo / README.md
Last active March 24, 2025 08:49
FastAPI Proxy

FastAPI HTTP Proxy Application

Introduction

This FastAPI application serves as an HTTP proxy, forwarding client requests to an upstream API server and relaying the server's response back to the client. It supports arbitrary paths and HTTP methods, providing a versatile proxy solution for various API interactions.

Requirements

  • Python 3.6 or higher
  • FastAPI
  • Uvicorn
  • HTTPX
@KokoseiJ
KokoseiJ / db.py
Created January 18, 2024 07:02
Simple Asynchronous MongoDB ORM on Python
import re
import asyncio
from pymongo import MongoClient
from pymongo.collection import Collection as MongoCollection
from pymongo.results import InsertOneResult, UpdateResult, DeleteResult
from typing import Awaitable, Self
mongo: MongoClient = None
DATABASE_NAME = "kokomemo"
@Calcifer777
Calcifer777 / reverse_proxy.py
Last active March 24, 2025 08:47
fasatapi reverse proxy
from fastapi import FastAPI, Request
from fastapi.responses import StreamingResponse
from starlette.background import BackgroundTask
import httpx
app = FastAPI()
client = httpx.AsyncClient(base_url="http://localhost:8000/")
async def reverse_proxy(r: Request):