Skip to content

Instantly share code, notes, and snippets.

View nachoad's full-sized avatar
😀
Happy!

Nacho Alonso nachoad

😀
Happy!
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.

@vickyqian
vickyqian / twitter crawler.txt
Last active May 11, 2024 16:19
A Python script to download all the tweets of a hashtag into a csv
import tweepy
import csv
import pandas as pd
####input your credentials here
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
@amar061996
amar061996 / twitter_bot.py
Last active March 27, 2017 07:19
read tweets from your timeline,check names of followers,read tweets posted by you and post tweets to your timeline 'num' times every 'min' mins
import tweepy,time,sys
from tweepy import OAuthHandler
import json
import io
fw=io.open("twitter.txt",'w',encoding='utf8')
def process_or_store(tweet):
print json.dumps(tweet) #use tweet['text'] to print only the text part
def read_tweets():
@chrislkeller
chrislkeller / output.txt
Last active April 21, 2019 22:45
Pull the screen name of followers given a twitter user using Tweepy. Output options for the Tweepy User object structure is here (may be outdated): http://tkang.blogspot.com/2011/01/tweepytwitter-api-user-object-structure.html
DEBUG:root:wendyfhsu
DEBUG:root:toastergrrl
DEBUG:root:ubernostrum
DEBUG:root:NickKatzmarek
DEBUG:root:kirkgoldsberry
DEBUG:root:jonnymutineer
DEBUG:root:MSrikat
DEBUG:root:ATXjj
DEBUG:root:RyanLanclos
DEBUG:root:monkeycycle_org
@yanofsky
yanofsky / LICENSE
Last active March 18, 2026 18:48
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@bzerangue
bzerangue / array2xml.php
Last active June 28, 2023 04:29
Decoding JSON to a PHP Array and then converting it to XML.
<?php
/**
* Array2XML: A class to convert array in PHP to XML
* It also takes into account attributes names unlike SimpleXML in PHP
* It returns the XML in form of DOMDocument class for further manipulation.
* It throws exception if the tag name or attribute name has illegal chars.
*
* Author : Lalit Patel
* Website: http://www.lalit.org/lab/convert-php-array-to-xml-with-attributes
* License: Apache License 2.0