https://simonwillison.net
Simon Willison’s Weblog
Simon Willison’s Weblog Simon Willison’s Weblog About Subscribe TILs On django 555 tools 18 prompt-engineering 92 uv 15 go 35 ... Recent Sept. 28, 2024 OpenFreeMap (via) New free map tile hosting service from Zsolt Ero: OpenFreeMap lets you display custom maps on your website and apps for free. […] Using our public instance is completely free: there are no limits on the number of map views or requests. There’s no registration, no user database, no API keys, and no cookies. We aim to cover the running costs of our public instance through donations. The site serves static vector tiles that work with MapLibre GL. It deliberately doesn’t offer any other services such as search or routing. From the project README looks like it’s hosted on two Hetzner machines. I don’t think the public server is behind a CDN. The self-hosting guide describes the scripts that are provided for downloading their pre-built tiles (needing a fresh Ubuntu server with 300GB of SSD and 4GB of RAM) or building the tiles yourself using Planetiler (needs 500GB of disk and 64GB of RAM). Getting started is delightfully straightforward: const map = new maplibregl.Map({ style: 'https://tiles.openfreemap.org/styles/liberty', center: [13.388, 52.517], zoom: 9.5, container: 'map', }) I got Claude to help build this demo showing a thousand random markers dotted around San Francisco. The 3D tiles even include building shapes! Zsolt built OpenFreeMap based on his experience running MapHub over the last 9 years. Here’s a 2018 interview about that project. It’s pretty incredible that the OpenStreetMap and open geospatial stack has evolved to the point now where it’s economically feasible for an individual to offer a service like this. I hope this turns out to be sustainable. # 9:41 pm / maps, ai-assisted-programming, geospatial, openstreetmap DjangoTV (via) Brand new site by Jeff Triplett gathering together videos from Django conferences around the world. Here's Jeff's blog post introducing the project. # 4:48 am / jeff-triplett, django Sept. 27, 2024 Some Go web dev notes. Julia Evans on writing small, self-contained web applications in Go: In general everything about it feels like it makes projects easy to work on for 5 days, abandon for 2 years, and then get back into writing code without a lot of problems. Go 1.22 introduced HTTP routing in February of this year, making it even more practical to build a web application using just the Go standard library. # 11:43 pm / web-development, go, julia-evans, http Themes from DjangoCon US 2024 I just arrived home from a trip to Durham, North Carolina for DjangoCon US 2024. I’ve already written about my talk where I announced a new plugin system for Django; here are my notes on some of the other themes that resonated with me during the conference. [... 1,470 words] 11:36 pm / accessibility, conferences, django, djangocon, jacob-kaplan-moss, python, redis, dsf Niche Museums: The Vincent and Ethel Simonetti Historic Tuba Collection. DjangoCon was in Durham, North Carolina this year and thanks to Atlas Obscura I found out about the fabulous Vincent and Ethel Simonetti Historic Tuba Collection. We got together a group of five for a visit and had a wonderful time being shown around the collection by curator Vincent Simonetti. This is my first update to Niche Museums in quite a while, it's nice to get that project rolling again. # 10:23 pm / museums, music Consumer products have had growth hackers for many years optimizing every part of the onboarding funnel. Dev tools should do the same. Getting started shouldn't be an afterthought after you built the product. Getting started is the product! And I mean this to the point where I think it's worth restructuring your entire product to enable fast onboarding. Get rid of mandatory config. Make it absurdly easy to set up API tokens. Remove all the friction. Make it possible for users to use your product on their laptop in a couple of minutes, tops. — Erik Bernhardsson # 2:33 pm / usability, developers Sept. 26, 2024 django-plugin-datasette. I did some more work on my DJP plugin mechanism for Django at the DjangoCon US sprints today. I added a new plugin hook, asgi_wrapper(), released in DJP 0.3 and inspired by the similar hook in Datasette. The hook only works for Django apps that are served using ASGI. It allows plugins to add their own wrapping ASGI middleware around the Django app itself, which means they can do things like attach entirely separate ASGI-compatible applications outside of the regular Django request/response cycle. Datasette is one of those ASGI-compatible applications! django-plugin-datasette uses that new hook to configure a new URL, /-/datasette/, which serves a full Datasette instance that scans through Django’s settings.DATABASES dictionary and serves an explore interface on top of any SQLite databases it finds there. It doesn’t support authentication yet, so this will expose your entire database contents - probably best used as a local debugging tool only. I did borrow some code from the datasette-mask-columns plugin to ensure that the password column in the auth_user column is reliably redacted. That column contains a heavily salted hashed password so exposing it isn’t necessarily a disaster, but I like to default to keeping hashes safe. # 9:57 pm / projects, sqlite, plugins, djp, datasette, django I think individual creators or publishers tend to overestimate the value of their specific content in the grand scheme of [AI training]. […] We pay for content when it’s valuable to people. We’re just not going to pay for content when it’s not valuable to people. I think that you’ll probably see a similar dynamic with AI, which my guess is that there are going to be certain partnerships that get made when content is really important and valuable. I’d guess that there are probably a lot of people who have a concern about the feel of it, like you’re saying. But then, when push comes to shove, if they demanded that we don’t use their content, then we just wouldn’t use their content. It’s not like that’s going to change the outcome of this stuff that much. — Mark Zuckerberg # 1:56 am / meta, generative-ai, training-data, mark-zuckerberg, ai Sept. 25, 2024 Llama 3.2. In further evidence that AI labs are terrible at naming things, Llama 3.2 is a huge upgrade to the Llama 3 series - they've released their first multi-modal vision models! Today, we’re releasing Llama 3.2, which includes small and medium-sized vision LLMs (11B and 90B), and lightweight, text-only models (1B and 3B) that fit onto edge and mobile devices, including pre-trained and instruction-tuned versions. The 1B and 3B text-only models are exciting too, with a 128,000 token context length and optimized for edge devices (Qualcomm and MediaTek hardware get called out specifically). Meta partnered directly with Ollama to help with distribution, here's the Ollama blog post. They only support the two smaller text-only models at the moment - this command will get the 3B model (2GB): ollama run llama3.2 And for the 1B model (a 1.3GB download): ollama run llama3.2:1b I had to first upgrade my Ollama by clicking on the icon in my macOS task tray and selecting "Restart to update". The two vision models are coming to Ollama "very soon". Once you have fetched the Ollama model you can access it from my LLM command-line tool like this: pipx install llm llm install llm-ollama llm chat -m llama3.2:1b I tried running my djp codebase through that tiny 1B model just now and got a surprisingly good result - by no means comprehensive, but way better than I would ever expect from a model of that size: files-to-prompt **/*.py -c | llm -m llama3.2:1b --system 'describe this code' Here's a portion of the output: The first section defines several test functions using the @djp.hookimpl decorator from the djp library. These hook implementations allow you to intercept and manipulate Django's behavior. test_middleware_order: This function checks that the middleware order is correct by comparing the MIDDLEWARE setting with a predefined list. test_middleware: This function tests various aspects of middleware: It retrieves the response from the URL /from-plugin/ using the Client object, which simulates a request to this view. It checks that certain values are present in the response: X-DJP-Middleware-After X-DJP-Middleware X-DJP-Middleware-Before [...] I found the GGUF file that had been downloaded by Ollama in my ~/.ollama/models/blobs directory. The following command let me run that model directly in LLM using the llm-gguf plugin: llm install llm-gguf llm gguf register-model ~/.ollama/models/blobs/sha256-74701a8c35f6c8d9a4b91f3f3497643001d63e0c7a84e085bed452548fa88d45 -a llama321b llm chat -m llama321b Meta themselves claim impressive performance against other existing models: Our evaluation suggests that the Llama 3.2 vision models are competitive with leading foundation models, Claude 3 Haiku and GPT4o-mini on image recognition and a range of visual understanding tasks. The 3B model outperforms the Gemma 2 2.6B and Phi 3.5-mini models on tasks such as following instructions, summarization, prompt rewriting, and tool-use, while the 1B is competitive with Gemma. Here's the Llama 3.2 collection on Hugging Face. You need to accept the new Llama 3.2 Community License Agreement there in order to download those models. You can try the four new models out via the Chatbot Arena - navigate to "Direct Chat" there and select them from the dropdown menu. You can upload images directly to the chat there to try out the vision features. # 8:28 pm / meta, vision-llms, generative-ai, llama, ai, llms Solving a bug with o1-preview, files-to-prompt and LLM. I added a new feature to DJP this morning: you can now have plugins specify their metadata in terms of how it should be positioned relative to other metadata - inserted directly before or directly after django.middleware.common.CommonMiddleware for example. At one point I got stuck with a weird test failure, and after ten minutes of head scratching I decided to pipe the entire thing into OpenAI's o1-preview to see if it could spot the problem. I used files-to-prompt to gather the code and LLM to run the prompt: files-to-prompt **/*.py -c | llm -m o1-preview " The middleware test is failing showing all of these - why is MiddlewareAfter repeated so many times? ['MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware5', 'MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware2', 'MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware5', 'MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware4', 'MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware5', 'MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware2', 'MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware5', 'MiddlewareAfter', 'Middleware3', 'MiddlewareAfter', 'Middleware', 'MiddlewareBefore']" The model whirled away for a few seconds and spat out an explanation of the problem - one of my middleware classes was accidentally calling self.get_response(request) in two different places. I did enjoy how o1 attempted to reference the relevant Django documentation and then half-repeated, half-hallucinated a quote from it: This took 2,538 input tokens and 4,354 output tokens - by my calculations at $15/million input and $60/million output that prompt cost just under 30 cents. # 6:41 pm / o1, llm, djp, openai, ai, llms, ai-assisted-programming, generative-ai We used this model [periodically transmitting configuration to different hosts] to distribute translations, feature flags, configuration, search indexes, etc at Airbnb. But instead of SQLite we used Sparkey, a KV file format developed by Spotify. In early years there was a Cron job on every box that pulled that service’s thingies; then once we switched to Kubernetes we used a daemonset & host tagging (taints?) to pull a variety of thingies to each host and then ensure the services that use the thingies only ran on the hosts that had the thingies. — Jake Teton-Landis # 6:08 pm / feature-flags, baked-data, sqlite, kubernetes The Pragmatic Engineer Podcast: AI tools for software engineers, but without the hype – with Simon Willison. Gergely Orosz has a brand new podcast, and I was the guest for the first episode. We covered a bunch of ground, but my favorite topic was an exploration of the (very legitimate) reasons that many engineers are resistant to taking advantage of AI-assisted programming tools. # 5:58 pm / podcasts, ai-assisted-programming, generative-ai, gergely-orosz, ai, llms DJP: A plugin system for Django DJP is a new plugin mechanism for Django, built on top of Pluggy. I announced the first version of DJP during my talk yesterday at DjangoCon US 2024, How to design and implement extensible software with plugins. I’ll post a full write-up of that talk once the video becomes available—this post describes DJP and how to use what I’ve built so far. [... 1,664 words] 2 pm / django, plugins, projects, djp Sept. 24, 2024 Updated production-ready Gemini models. Two new models from Google Gemini today: gemini-1.5-pro-002 and gemini-1.5-flash-002. Their -latest aliases will update to these new models in "the next few days", and new -001 suffixes can be used to stick with the older models. The new models benchmark slightly better in various ways and should respond faster. Flash continues to have a 1,048,576 input token and 8,192 output token limit. Pro is 2,097,152 input tokens. Google also announced a significant price reduction for Pro, effective on the 1st of October. Inputs less than 128,000 tokens drop from $3.50/million to $1.25/million (above 128,000 tokens it's dropping from $7 to $5) and output costs drop from $10.50/million to $2.50/million ($21 down to $10 for the >128,000 case). For comparison, GPT-4o is currently $5/m input and $15/m output and Claude 3.5 Sonnet is $3/m input and $15/m output. Gemini 1.5 Pro was already the cheapest of the frontier models and now it's even cheaper. Correction: I missed gpt-4o-2024-08-06 which is listed later on the OpenAI pricing page and priced at $2.50/m input and $10/m output. So the new Gemini 1.5 Pro prices are undercutting that. Gemini has always offered finely grained safety filters - it sounds like those are now turned down to minimum by default, which is a welcome change: For the models released today, the filters will not be applied by default so that developers can determine the configuration best suited for their use case. Also interesting: they've tweaked the expected length of default responses: For use cases like summarization, question answering, and extraction, the default output length of the updated models is ~5-20% shorter than previous models. # 4:55 pm / gemini, google, generative-ai, ai, llms nanodjango. Richard Terry demonstrated this in a lightning talk at DjangoCon US today. It's the latest in a long line of attempts to get Django to work with a single file (I had a go at this problem 15 years ago with djng) but this one is really compelling. I tried nanodjango out just now and it works exactly as advertised. First install it like this: pip install nanodjango Create a counter.py file: from django.db import models from nanodjango import Django app = Django() @app.admin # Registers with the Django admin class CountLog(models.Model): timestamp = models.DateTimeField(auto_now_add=True) @app.route("/") def count(request): CountLog.objects.create() return f"
Number of page loads: {CountLog.objects.count()}
" Then run it like this (it will run migrations and create a superuser as part of that first run): nanodjango run counter.py That's it! This gave me a fully configured Django application with models, migrations, the Django Admin configured and a bunch of other goodies such as Django Ninja for API endpoints. Here's the full documentation. # 4:08 pm / radiac, django, python XKCD 1425 (Tasks) turns ten years old today (via) One of the all-time great XKCDs. It's amazing that "check whether the photo is of a bird" has gone from PhD-level to trivially easy to solve (with a vision LLM, or CLIP, or ResNet+ImageNet among others). The key idea still very much stands though. Understanding the difference between easy and hard challenges in software development continues to require an enormous depth of experience. I'd argue that LLMs have made this even worse. Understanding what kind of tasks LLMs can and cannot reliably solve remains incredibly difficult and unintuitive. They're computer systems that are terrible at maths and that can't reliably lookup facts! On top of that, the rise of AI-assisted programming tools means more people than ever are beginning to create their own custom software. These brand new AI-assisted proto-programmers are having a crash course in this easy-v.s.-hard problem. I saw someone recently complaining that they couldn't build a Claude Artifact that could analyze images, even though they knew Claude itself could do that. Understanding why that's not possible involves understanding how the CSP headers that are used to serve Artifacts prevent the generated code from making its own API calls out to an LLM! # 3:08 pm / clip, ai-assisted-programming, xkcd, ai, llms Things I’ve Learned Serving on the Board of The Perl Foundation (via) My post about the PSF board inspired Perl Foundation secretary Makoto Nozaki to publish similar notes about how TPF (also known since 2019 as TPRF, for The Perl and Raku Foundation) operates. Seeing this level of explanation about other open source foundations is fascinating. I’d love to see more of these. Along those lines, I found the 2024 Financial Report from the Zig foundation really interesting too. # 1:42 am / open-source, zig, perl, psf Sept. 23, 2024 simonw/docs cookiecutter template. Over the last few years I’ve settled on the combination of Sphinx, the Furo theme and the myst-parser extension (enabling Markdown in place of reStructuredText) as my documentation toolkit of choice, maintained in GitHub and hosted using ReadTheDocs. My LLM and shot-scraper projects are two examples of that stack in action. Today I wanted to spin up a new documentation site so I finally took the time to construct a cookiecutter template for my preferred configuration. You can use it like this: pipx install cookiecutter cookiecutter gh:simonw/docs Or with uv: uv tool run cookiecutter gh:simonw/docs Answer a few questions: [1/3] project (): shot-scraper [2/3] author (): Simon Willison [3/3] docs_directory (docs): And it creates a docs/ directory ready for you to start editing docs: cd docs pip install -r requirements.txt make livehtml # 9:45 pm / uv, markdown, sphinx-docs, cookiecutter, read-the-docs, python, projects, documentation SPAs incur complexity that simply doesn't exist with traditional server-based websites: issues such as search engine optimization, browser history management, web analytics and first page load time all need to be addressed. Proper analysis and consideration of the trade-offs is required to determine if that complexity is warranted for business or user experience reasons. Too often teams are skipping that trade-off analysis, blindly accepting the complexity of SPAs by default even when business needs don't justify it. We still see some developers who aren't aware of an alternative approach because they've spent their entire career in a framework like React. — Thoughtworks, October 2022 # 2:49 pm / react, javascript Sept. 22, 2024 The problem I have with [pipenv shell] is that the act of manipulating the shell environment is crappy and can never be good. What all these "X shell" things do is just an abomination we should not promote IMO. Tools should be written so that you do not need to reconfigure shells. That we normalized this over the last 10 years was a mistake and we are not forced to continue walking down that path :) — Armin Ronacher # 8:09 pm / armin-ronacher Jiter (via) One of the challenges in dealing with LLM streaming APIs is the need to parse partial JSON - until the stream has ended you won't have a complete valid JSON object, but you may want to display components of that JSON as they become available. I've solved this previously using the ijson streaming JSON library, see my previous TIL. Today I found out about Jiter, a new option from the team behind Pydantic. It's written in Rust and extracted from pydantic-core, so the Python wrapper for it can be installed using: pip install jiter You can feed it an incomplete JSON bytes object and use partial_mode="on" to parse the valid subset: import jiter partial_json = b'{"name": "John", "age": 30, "city": "New Yor' jiter.from_json(partial_json, partial_mode="on") # {'name': 'John', 'age': 30} Or use partial_mode="trailing-strings" to include incomplete string fields too: jiter.from_json(partial_json, partial_mode="trailing-strings") # {'name': 'John', 'age': 30, 'city': 'New Yor'} The current README was a little thin, so I submiitted a PR with some extra examples. I got some help from files-to-prompt and Claude 3.5 Sonnet): cd crates/jiter-python/ && files-to-prompt -c README.md tests | llm -m claude-3.5-sonnet --system 'write a new README with comprehensive documentation' # 8:03 pm / json, python How streaming LLM APIs work. New TIL. I used curl to explore the streaming APIs provided by OpenAI, Anthropic and Google Gemini and wrote up detailed notes on what I learned. Also includes example code for receiving streaming events in Python with HTTPX and receiving streaming events in client-side JavaScript using fetch(). # 3:48 am / apis, http, llms, json Sept. 21, 2024 Whether you think coding with AI works today or not doesn’t really matter. But if you think functional AI helping to code will make humans dumber or isn’t real programming just consider that’s been the argument against every generation of programming tools going back to Fortran. — Steven Sinofsky # 2:44 pm / ai-assisted-programming, ai Markdown and Math Live Renderer. Another of my tiny Claude-assisted JavaScript tools. This one lets you enter Markdown with embedded mathematical expressions (like $ax^2 + bx + c = 0$) and live renders those on the page, with an HTML version using MathML that you can export through copy and paste. Here's the Claude transcript. I started by asking: Are there any client side JavaScript markdown libraries that can also handle inline math and render it? Claude gave me several options including the combination of Marked and KaTeX, so I followed up by asking: Build an artifact that demonstrates Marked plus KaTeX - it should include a text area I can enter markdown in (repopulated with a good example) and live update the rendered version below. No react. Which gave me this artifact, instantly demonstrating that what I wanted to do was possible. I iterated on it a tiny bit to get to the final version, mainly to add that HTML export and a Copy button. The final source code is here. # 4:56 am / claude-3-5-sonnet, anthropic, claude, markdown, mathml, ai, llms, ai-assisted-programming, tools, generative-ai, claude-artifacts Sept. 20, 2024 YouTube Thumbnail Viewer. I wanted to find the best quality thumbnail image for a YouTube video, so I could use it as a social media card. I know from past experience that GPT-4 has memorized the various URL patterns for img.youtube.com, so I asked it to guess the URL for my specific video. This piqued my interest as to what the other patterns were, so I got it to spit those out too. Then, to save myself from needing to look those up again in the future, I asked it to build me a little HTML and JavaScript tool for turning a YouTube video URL into a set of visible thumbnails. I iterated on the code a bit more after pasting it into Claude and ended up with this, now hosted in my tools collection. # 4:45 am / youtube, ai-assisted-programming, generative-ai, ai, llms, tools Notes on using LLMs for code I was recently the guest on TWIML—the This Week in Machine Learning & AI podcast. Our episode is titled Supercharging Developer Productivity with ChatGPT and Claude with Simon Willison, and the focus of the conversation was the ways in which I use LLM tools in my day-to-day work as a software developer and product engineer. [... 859 words] 3:10 am / podcasts, ai, openai, generative-ai, chatgpt, llms, ai-assisted-programming, anthropic, claude, claude-artifacts Introducing Contextual Retrieval (via) Here's an interesting new embedding/RAG technique, described by Anthropic but it should work for any embedding model against any other LLM. One of the big challenges in implementing semantic search against vector embeddings - often used as part of a RAG system - is creating "chunks" of documents that are most likely to semantically match queries from users. Anthropic provide this solid example where semantic chunks might let you down: Imagine you had a collection of financial information (say, U.S. SEC filings) embedded in your knowledge base, and you received the following question: "What was the revenue growth for ACME Corp in Q2 2023?" A relevant chunk might contain the text: "The company's revenue grew by 3% over the previous quarter." However, this chunk on its own doesn't specify which company it's referring to or the relevant time period, making it difficult to retrieve the right information or use the information effectively. Their proposed solution is to take each chunk at indexing time and expand it using an LLM - so the above sentence would become this instead: This chunk is from an SEC filing on ACME corp's performance in Q2 2023; the previous quarter's revenue was $314 million. The company's revenue grew by 3% over the previous quarter." This chunk was created by Claude 3 Haiku (their least expensive model) using the following prompt template:
{{WHOLE_DOCUMENT}} Here is the chunk we want to situate within the whole document
{{CHUNK_CONTENT}} Please give a short succinct context to situate this chunk within the overall document for the purposes of improving search retrieval of the chunk. Answer only with the succinct context and nothing else. Here's the really clever bit: running the above prompt for every chunk in a document could get really expensive thanks to the inclusion of the entire document in each prompt. Claude added context caching last month, which allows you to pay around 1/10th of the cost for tokens cached up to your specified beakpoint. By Anthropic's calculations: Assuming 800 token chunks, 8k token documents, 50 token context instructions, and 100 tokens of context per chunk, the one-time cost to generate contextualized chunks is $1.02 per million document tokens. Anthropic provide a detailed notebook demonstrating an implementation of this pattern. Their eventual solution combines cosine similarity and BM25 indexing, uses embeddings from Voyage AI and adds a reranking step powered by Cohere. The notebook also includes an evaluation set using JSONL - here's that evaluation data in Datasette Lite. # 1:34 am / anthropic, claude, generative-ai, ai, embeddings, llms, search, rag, prompt-engineering Sept. 19, 2024 Moshi (via) Moshi is "a speech-text foundation model and full-duplex spoken dialogue framework". It's effectively a text-to-text model - like an LLM but you input audio directly to it and it replies with its own audio. It's fun to play around with, but it's not particularly useful in comparison to other pure text models: I tried to talk to it about California Brown Pelicans and it gave me some very basic hallucinated thoughts about California Condors instead. It's very easy to run locally, at least on a Mac (and likely on other systems too). I used uv and got the 8 bit quantized version running as a local web server using this one-liner: uv run --with moshi_mlx python -m moshi_mlx.local_web -q 8 That downloads ~8.17G of model to a folder in ~/.cache/huggingface/hub/ - or you can use -q 4 and get a 4.81G version instead (albeit even lower quality). # 6:20 pm / generative-ai, uv, text-to-speech, ai, llms The web’s clipboard, and how it stores data of different types. Alex Harri's deep dive into the Web clipboard API, the more recent alternative to the old document.execCommand() mechanism for accessing the clipboard. There's a lot to understand here! Some of these APIs have a history dating back to Internet Explorer 4 in 1997, and there have been plenty of changes over the years to account for improved understanding of the security risks of allowing untrusted code to interact with the system clipboard. Today, the most reliable data formats for interacting with the clipboard are the "standard" formats of text/plain, text/html and image/png. Figma does a particularly clever trick where they share custom Figma binary data structures by encoding them as base64 in data-metadata and data-buffer attributes on a
element, then write the result to the clipboard as HTML. This enables copy-and-paste between the Figma web and native apps via the system clipboard. # 6:16 pm / javascript Sept. 18, 2024 The problem that you face is that it's relatively easy to take a model and make it look like it's aligned. You ask GPT-4, “how do I end all of humans?” And the model says, “I can't possibly help you with that”. But there are a million and one ways to take the exact same question - pick your favorite - and you can make the model still answer the question even though initially it would have refused. And the question this reminds me a lot of coming from adversarial machine learning. We have a very simple objective: Classify the image correctly according to the original label. And yet, despite the fact that it was essentially trivial to find all of the bugs in principle, the community had a very hard time coming up with actually effective defenses. We wrote like over 9,000 papers in ten years, and have made very very very limited progress on this one small problem. You all have a harder problem and maybe less time. — Nicholas Carlini # 6:52 pm / machine-learning, ai, jailbreak, security Highlights Themes from DjangoCon US 2024 - Sept. 27, 2024 DJP: A plugin system for Django - Sept. 25, 2024 Notes on using LLMs for code - Sept. 20, 2024 Things I've learned serving on the board of the Python Software Foundation - Sept. 18, 2024 Notes on OpenAI's new o1 chain-of-thought models - Sept. 12, 2024 Notes from my appearance on the Software Misadventures Podcast - Sept. 10, 2024 Teresa T is name of the whale in Pillar Point Harbor near Half Moon Bay - Sept. 8, 2024 Calling LLMs from client-side JavaScript, converting PDFs to HTML + weeknotes - Sept. 6, 2024 Building a tool showing how Gemini Pro can return bounding boxes for objects in images - Aug. 26, 2024 Claude's API now supports CORS requests, enabling client-side applications - Aug. 23, 2024 Optimizing Datasette (and other weeknotes) - Aug. 22, 2024 django-http-debug, a new Django app mostly written by Claude - Aug. 8, 2024 Weeknotes: a staging environment, a Datasette alpha and a bunch of new LLMs - Aug. 6, 2024 Datasette 1.0a14: The annotated release notes - Aug. 5, 2024 Weeknotes: GPT-4o mini, LLM 0.15, sqlite-utils 3.37 and building a staging environment - July 19, 2024 Imitation Intelligence, my keynote for PyCon US 2024 - July 14, 2024 Give people something to link to so they can talk about your features and ideas - July 13, 2024 Weeknotes: a livestream, a surprise keynote and progress on Datasette Cloud billing - July 2, 2024 Open challenges for AI engineering - June 27, 2024 Building search-based RAG using Claude, Datasette and Val Town - June 21, 2024 Weeknotes: Datasette Studio and a whole lot of blogging - June 19, 2024 Language models on the command-line - June 17, 2024 A homepage redesign for my blog's 22nd birthday - June 12, 2024 Thoughts on the WWDC 2024 keynote on Apple Intelligence - June 10, 2024 Accidental prompt injection against RAG applications - June 6, 2024 Training is not the same as chatting: ChatGPT and other LLMs don't remember everything you say - May 29, 2024 Weeknotes: PyCon US 2024 - May 28, 2024 ChatGPT in "4o" mode is not running the new features yet - May 15, 2024 Slop is the new name for unwanted AI-generated content - May 8, 2024 Weeknotes: more datasette-secrets, plus a mystery video project - May 7, 2024 Weeknotes: Llama 3, AI for Data Journalism, llm-evals and datasette-secrets - April 23, 2024 Options for accessing Llama 3 from the terminal using LLM - April 22, 2024 AI for Data Journalism: demonstrating what we can do with this stuff right now - April 17, 2024 Three major LLM releases in 24 hours (plus weeknotes) - April 10, 2024 Building files-to-prompt entirely using Claude 3 Opus - April 8, 2024 Running OCR against PDFs and images directly in your browser - March 30, 2024 llm cmd undo last git commit - a new plugin for LLM - March 26, 2024 Building and testing C extensions for SQLite with ChatGPT Code Interpreter - March 23, 2024 Claude and ChatGPT for ad-hoc sidequests - March 22, 2024 Weeknotes: the aftermath of NICAR - March 16, 2024 Colophon © 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024engben-gb1729448881https://simonwillison.net
Breyta síðunni þinni?
Hvað ertu að gera?