Skip to content

Instantly share code, notes, and snippets.

View bitflower's full-sized avatar

Matthias Max bitflower

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.

description Start a brainstorming session to create a feature specification
argument-hint <feature-name>

Feature Specification or Bug Investigation

Start a collaborative session for: $ARGUMENTS

Mode Detection

@maxjustus
maxjustus / as-source.tsx
Created November 5, 2020 23:37
A stencil functional component for rendering the children element's markup in a <code> element along side the rendered jsx
import { h, ChildNode, FunctionalComponent, FunctionalUtilities } from "@stencil/core";
function vnodeToSource(elem: ChildNode, utils: FunctionalUtilities, output = "", level = 0): string {
if (elem.vchildren) {
let childOutput: string[] = [];
utils.forEach(elem.vchildren, (child) => {
childOutput.push(vnodeToSource(child, utils, output, level + 1));
});
@jdnichollsc
jdnichollsc / animatable-component.html
Last active February 16, 2022 09:10
Animatable Components using Higher Order Component (HOC) with StencilJS 🙌 - https://proyecto26.github.io/animatable-component
<animatable-component
autoplay
easing="ease-in-out"
duration="800"
delay="300"
animation="zoomIn"
iterations="Infinity"
direction="alternate"
>
<h1>Hello World</h1>
@StefanNieuwenhuis
StefanNieuwenhuis / reactiveconf-framework-independent-components-library-with-StencilJS.md
Last active September 23, 2020 12:55
How to build a framework independent component library with StencilJS

How to build a framework independent component library with StencilJS

This is a proposal for a lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal! If you're on your phone, please request the 🖥 desktop site to star this gist 😇 #ReactiveConf

@heygrady
heygrady / render-props.md
Last active August 6, 2024 18:50
Avoiding HOC; Favoring render props
@markerikson
markerikson / appEntryPoint.js
Last active October 30, 2024 10:11
Webpack React/Redux Hot Module Reloading (HMR) example
import React from "react";
import ReactDOM from "react-dom";
import configureStore from "./store/configureStore";
const store = configureStore();
const rootEl = document.getElementById("root");
@hoschi
hoschi / SagaManager.js
Created May 11, 2016 16:56
Hot reloadable redux-saga ... sagas
import mySaga from 'mySaga';
import { take, fork, cancel } from 'redux-saga/effects';
const sagas = [mySaga];
export const CANCEL_SAGAS_HMR = 'CANCEL_SAGAS_HMR';
function createAbortableSaga (saga) {
if (process.env.NODE_ENV === 'development') {
return function* main () {
@CamdenSegal
CamdenSegal / custom-endpoints.php
Created October 11, 2014 03:38
WP_JSON_CustomPostType Endpoint Generation
class MAP_API_DemoItemType extends WP_JSON_CustomPostType {
protected $base = '/map/demo';
protected $type = 'demo';
public function register_routes( $routes ) {
$routes = parent::register_routes( $routes );
return $routes;
}
}
@codfish
codfish / uiEqualHeights.js
Last active February 12, 2018 09:02
AngularJS Equal Height columns directive.
'use strict';
/**
* Equal Heights
*
* Attach this directive to the parent/wrapping element of
* a bunch of elements that are columns. This directive will
* calculate the height of every direct child (one level down)
* then set all of them to be the height of the tallest one.
*