Skip to content

Instantly share code, notes, and snippets.

View umarali's full-sized avatar

Umar Ali umarali

  • Emerssive
  • Pakistan
View GitHub Profile
@umarali
umarali / llm-wiki.md
Created April 9, 2026 19:58 — forked from karpathy/llm-wiki.md
llm-wiki

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.

@umarali
umarali / Members
Created October 6, 2022 23:11
Fiduciary App - Messages
Array [
Object {
"active": true,
"age": 0,
"contactId": "0035f00000gYBlZAAW",
"createdDate": "2022-07-20T00:13:19.000Z",
"crmId": "0035f00000gYBlZAAW",
"email": "contact@emerssive.com",
"firstName": "Anna",
"fullName": "Anna Haro",
{
"posts": [{
"id": "1",
"content": "Salaam, this is my first post.",
"date_posted": "Sept 20, 2020",
"author": {
"name": "Hamza Asghar Farooqi",
"image_src": "/path/to/image.png"
}
}, {
@umarali
umarali / bss.steps
Last active May 22, 2019 10:33
Steps to Setup BSS Project
Remove the hashes (#) from the db/#database.yml# file name
Run `rake db:create` (to create db) followed by `rake db:migrate` (to migrate all the pending migrations)
Download respective JRE for your system from the following link, and instal JRE: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Run `bundle exec rake sunspot:solr:start` to run Solr search engine
Start Rails server on port 3000 or any other port. e.g. rails s -p <PORT> (you can install ngrok and then run `ngrok http <PORT>` to expose your local web server)
Once done, hit your localhost followed by '/items/import' route. e.g. If you're running your Rails web server on port 3000, then you shall hit this url in your browser: http://localhost:3000/items/import (this loads and runs through some scripts to populate data in the connected database)
Useful Link:
a. Debugging common issues with Solr (https://suchdevblog.com/DebuggingSolrSunspot.html#halp-solr-returns-no-results)