Skip to content

Instantly share code, notes, and snippets.

USER

There’s push-back from many teachers about the use of GenAI in teaching, but I feel like some of the arguments against GenAI might have been also used against video capture for lectures or even traditional textbooks. Help me map out this space.

ASSISTANT

Mapping the Space of Educational Technology Resistance

You raise an interesting parallel between current GenAI resistance and historical reactions to other educational technologies. Here's a mapping of this space:

Common Patterns of Resistance Across Technologies

@rndmcnlly
rndmcnlly / Smith's ideal chat equation.md
Created April 18, 2025 04:00
it's like the rocket equation for chatbots

USER

Let’s talk about Smith’s ideal chat equation. (I’m Smith, and we’re makin’ it up right here.)

It’s a way to figure out the total cost of an idealized LLM chat assistant conversation with t turns where on each turn the user sends messages with m_u tokens and sees the assistant writes replies with m_a tokens. The inputs to the LLM (the most recent user message and all past user and assistant messages) have a discounted cost lambda whereas the output tokens (making up assistant replies) have unit cost.

ASSISTANT

Smith's Ideal Chat Equation

I'd be happy to develop this concept with you, Smith! Let's formalize your idea for calculating the cost of an idealized LLM chat conversation.

@rndmcnlly
rndmcnlly / thinking.gbnf
Last active April 17, 2025 22:09
forcing the model to think; playing a game
# I force the model to think with periodic interruptions before speaking normally.
# llama-cli -hf ggml-org/gemma-3-27b-it-GGUF --grammar-file thinking.gbnf --system-prompt "Text in thinking tags is not visible to the user, so you should always say something after thinking. Think first to make sure you have a good reply."
root ::= (thought speech){1,3}
thought ::= "<thinking>" ([^<]{256} "\n\n" interruption "\n\n"){0,4} [^<]{2,255} "</thinking>\n\n"
speech ::= [^<\n][^<]*
interruption ::= (exclamation "!" | "*" action "*") summary
exclamation ::= "Wait" | "Ah" | "Aha" | "Hey" | "Stop" | "Oh"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Memory Block Deduplication Visualization</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;

USER

Converting Stanford University to a public university by absorbing it into the UC system, citing existing special treatment in the state constitution…

ASSISTANT

Converting Stanford University into a public university within the University of California (UC) system would be extraordinarily challenging. While the California Constitution provides specific governance provisions and protections for the UC system—thus offering specific constitutional recognition that could potentially streamline certain administrative aspects—there remain considerable obstacles:

  1. Institutional Autonomy and Private Ownership:
    Stanford University is a privately chartered nonprofit institution with its own independent governance structure, funding sources, and oversight by private trustees. To integrate it into the UC system would require complex negotiations to transfer ownership, endowment management, and operations from a private entity to a public institution.

  2. **California Constitutional Provisions fo

@rndmcnlly
rndmcnlly / prompt.txt
Created March 4, 2025 01:50
nested image description prompt expander thingy
You are tasked with expanding image prompt templates containing nested expressions in braces {}. Your job is to iteratively identify and expand the innermost braced expression until no braced expressions remain.
PROCESS:
1. Identify the innermost braced expression {X}
2. Replace that expression with a specific, creative expansion
3. Show the new state of the prompt
4. Repeat steps 1-3 until no braced expressions remain
5. Output the final, fully expanded prompt
Use <original>, <step>, and <final> XML tags to clearly mark each stage of the expansion process.

USER

show me a directed graph layout with d3 in a self-ctoaned html exmaple

ASSISTANT

Here's a complete, self-contained HTML example that creates a directed graph using D3.js:

<!DOCTYPE html>
<html>
<head>

I'm trying to find a nice way to integrate transparent tool-calling into an Open WebUI agent. Most tool-calling mechanisms are designed to hide the calls and their results from the user. This is problematic for OWUI because OWUI only stores the user-visible text of a conversation. To reconstruct the results of external actions, I either need to re-play the actions (hopefully yielding similar cached results) or create my own persistent storage system within OWUI. I'd rather just make everything visible in the public-facing text.

The idea I'm exploring here is to use the <details> syntax (ref) supported by many markdown renderers, including OWUI.

When asking the LLM to generate a reply, we'll use </summary> as a stop sequence. This way, a filter outlet can notice when a new tool call is atte

USER

Without making any comments yet, take in these course recap notes for a course I’ve just finished teaching. I think I might want to generate a song about them soon to share with students as they head into Finals Week for the course.

(bulk text elided)

ASSISTANT

Got it! I'll keep these notes in mind if you'd like to craft a song based on them. Let me know how you'd like to proceed—whether there's a specific tone, style, or key points you want highlighted for your students. This is a treasure trove of ideas!

USER

To structure the song, we’ll want to identify some general themes to hit in the repeating chorus (perhaps related to seeing programming as writing, a human communication activity), and then we’ll have some verses that go into specific facets of the courses. I’m not sure what the verses should be about yet, so I’ll need your help. Use bulleted lists to sketch the chorus themes and then give me about 5 distinct ideas for verse-level focus themes.

SYSTEM PROMPT

Simulate an instructor and two students during office hours. The instructor is an expert in the field, but the two students are not. Student A is eager to learn and often trusts what the instructor says, while Student B is skeptical and sometimes doesn't pay attention. In your responses, tell me what the Instructor, Student A, and Student B would say based on the questions that I've raised. Not every person talks each time, but sometimes they say more than one thing before I get a chance to talk again. Keep the responses very brief, conversational, and relatable.

USER

Can you tell me about the Flyweight pattern in software engineering?

ASSISTANT

Instructor: Of course! The Flyweight pattern is a structural design pattern that minimizes memory usage by sharing as much data as possible between similar objects. It’s useful when you have a large number of objects that share common properties.