Skip to content

Instantly share code, notes, and snippets.

View lisovskyvlad's full-sized avatar

Wlad Lisowski lisovskyvlad

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.

top10Salaries :: FilePath -> IO ()
top10Salaries path = do
Just (h, t) <- uncons . T.lines <$> T.readFile path
let
split = T.splitOn ","
Just ind = elemIndex "Salary" $ split h
top10 :: [Int] = t
& map (\s -> read $ T.unpack $ split s !! ind)
& sortBy (flip compare)
& take 10
const setUpClipboardHandler = (el) => {
let hasFiles = false;
let counter = 0;
const upload = (fileOrFiles) => {
let fileInput = null;
if (el.dataset.chunkId) {
fileInput = document.querySelector(`form[data-chunk-id="${el.dataset.chunkId}"] input[type="file"]`);
} else {
@kyleshevlin
kyleshevlin / memoizedHandlers.js
Created January 22, 2021 00:26
Using React.useMemo to create a `handlers` object
// One of my new favorite React Hook patternms is to create handler
// functions for a custom hook using `React.useMemo` instead of
// `React.useCallback`, like so:
function useBool(initialState = false) {
const [state, setState] = React.useState(initialState)
// Instead of individual React.useCallbacks gathered into an object
// Let's memoize the whole object. Then, we can destructure the
// methods we need in our consuming component.
@jferris
jferris / configmap.yaml
Last active October 28, 2024 01:42
Rails Kubernetes Manifests
apiVersion: v1
kind: ConfigMap
metadata:
name: example
namespace: default
data:
APPLICATION_HOST: example.com
LANG: en_US.UTF-8
PIDFILE: /tmp/server.pid
PORT: "3000"
import * as React from 'react';
import { useState } from 'react';
import { useHistory } from 'react-router-dom';
import useAsyncCallback from './useAsyncCallback';
export default function LoginPage() {
let history = useHistory();
return (
<article>
{/* какой-то контент, всё что угодно на странице логина */}
@darkleaf
darkleaf / question.md
Last active April 15, 2023 08:34
Algebraic effects для Clojure.

Привет!

Ключевые слова: coroutine, continuation, generators, async/await, project loom, free monad, algebraic effects.

Я хочу сделать алгебраические эффекты для Clojure(Script). Я уже сделал библиотеку https://github.com/darkleaf/effect/blob/doc-2/README.md Но есть моменты, которые вызывают у меня вопросы.

Если очень кратко, то лично мне эффекты нужны, чтобы:

  1. удобно тестировать бизнес логику
@roman01la
roman01la / clojurescript-repl-workflow.md
Last active October 22, 2022 12:07
ClojureScript REPL Workflow

ClojureScript REPL Workflow

Short write up on using REPL when developing UIs in ClojureScript.

Hot-reload on save or Eval in REPL?

Everyone's standard approach to hot-reloading is to use a tool (Figwheel or shadow-cljs) that reloads changed namespaces automatically. This works really well: you change the code, the tool picks up changed files, compiles namespaces and dependants, notifies REPL client which then pulls in compiled changes, and re-runs a function that re-renders UI.

The other approach is to use ClojureScript's REPL directly and rely only on eval from the editor. This more or less matches Clojure style workflow. This approach might be useful when you don't want tools overhead or hot-reloading becomes slow for you or you just used to this style of interactions. Also changing code doesn't always mean that you want to reload all the changes. On the other hand it is very easy to change a couple of top-level forms and forget to eval one of them.

@yogthos
yogthos / clojure-beginner.md
Last active April 20, 2026 21:55
Clojure beginner resources

Introductory resources

{
"meta": {
"theme": "professional",
"lastModified": "2026-03-12T00:00:00.000Z"
},
"basics": {
"name": "Thomas Davis",
"phone": "0411021021",
"label": "Full Stack Developer & AI Engineer",
"image": "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4",