Email or username:

Password:

Forgot your password?
306 posts total
Simon Willison

Just got a great first impression running Open WebUI - took one command to get it up and running (uvx --python 3.11 open-webui serve) and it noticed I had Ollama running and automatically gave me a UI to interact with those models simonwillison.net/2024/Dec/27/

Simon Willison

Also got a reminder of how freakishly capable the tiny (1.9GB) Llama 3.2:3B model is at summarization and question answering against documents you feed into it via its impressive 128,000 token context

Prompt

How do I use SpatiaLite with Datasette?

Attachment: spatialite.rst

Response

To use SpatiaLite with Datasette, you need to install the mod_spatialite dynamic library. This can then be loaded into Datasette using the --load-extension command-line option.

You can install it on OS X by running brew update and then brew install spatialite-tools. On Linux, SpatiaLite is packaged for most distributions, so you can typically install it with a package manager like apt.

When running Datasette, you can look for SpatiaLite in common installation locations or specify the full path to the extension if it's installed elsewhere.

For example, on OS X, you might run datasette --load-extension=spatialite after installing it with Homebrew. On Linux, you could use datasette --load-extension=/usr/lib/x86_64-linux-gnu/mod_spatialite.so.

It's also important to note that SpatiaLite adds a large number of additional SQL functions, some of which are not safe for untrusted users to execute. To secure your Datasette instance, consider disabling arbitrary SQL queries and defining canned queries with the SQL queries that use SpatiaLite functions you want people to be able to execute.
Simon Willison

Question for anyone who started 2024 thinking that this whole "AI" thing (specifically of the ChatGPT LLM/generative AI variety) was over-hyped junk that wasn't actually useful for anything

Have developments over the last twelve months changed your mind?

Anonymous poll

Poll

No, I still think it's useless
257
34.4%
OK, it can be slightly useful
248
33.2%
OK, it can be very useful
78
10.4%
I never thought that
165
22.1%
748 people voted.
Voting ended yesterday at 1:57.
Show previous comments
AndrejBag

@simon 1/2: I find AI deeply unscientific the way you interact with it. Knowledge in modernity took a turn epistemologically speaking from god to an agreement like relationship between theory and practice. Knowledge is not what agrees with someone or is true but what represents an agreement between theory and practice. All scientific work revolves around that. These sophisticated text generators are little more than lemma generators.

AndrejBag

@simon 2/2: You can look up a mix of words that may be true believing to have gained insight without engaging into building your own model of something or performing your own experiment. Now if it were to force you to do just that... Its a shortcut to mediocrity. I usually use it for tedious tasks that I am unable to automate or ask it to scrutinize my premises, models or experiments but, to no surprise, I rarely find out anything that's not contained in a well curated article or dictionary.

Stuart Langridge

@simon I don’t think AI’s useless. I think it’s being used for all sorts of things it’s not appropriate for because of hype, i think almost everyone who stands to make any money from that happening is annoying, and most importantly i think that it’s more damaging than any use is worth. Like, say, fossil fuels (which is not a bad analogy). This year has only multiplied the above sentiments more. But I suppose this means the poll doesn’t apply to me!

Simon Willison

Turns out we weren't done for major LLM releases in 2024 after all... Alibaba's Qwen just released QvQ, a "visual reasoning model" - the same chain-of-thought trick as OpenAI's o1 but applied strictly to running a prompt against an image

I've been trying it out and it's a lot of fun to poke around with: simonwillison.net/2024/Dec/24/

Simon Willison

Here's what it said when I asked it to count those pelicans



    So I’ve got this picture of some pelicans, and I need to count them. Let me see... First off, I know that pelicans are those big birds with the massive beaks, right? [...]

    Let me try counting again, more carefully this time. Starting from the left:

        The first pelican is fully visible, standing at the front.
        Behind it, slightly to the right, is the second pelican.
        Then, further back, there’s a third pelican.
        And next to that one, there’s a fourth pelican.

    So, that’s four pelicans in total. But, I notice that on the far right of the image, there’s part of another bird, maybe a pelican’s back or tail feathers, but it’s not fully in the frame, so I don’t think I should count it as a whole pelican.
Martin Owens :inkscape:

@simon

It's a fairly good system, I asked it some confusing questions about unlikely images. Like what is a unicorn made out of (chocolate, correct).

Fairly impressive for 64GB. lmk how your local trials go.

Chi Kim

@FreakyFwoof @simon When reasoning goes to a path of hallucination, it says all kind of things beyond visual. lol Here's an example: "I can also imagine the sounds that might be present in this scene: the gentle lapping of water against the shore, the creaking of the boat as it moves with the current, birds chirping in the background, and maybe the distant rustling of leaves in the wind."

Simon Willison

Wrote up my notes on ModernBERT, the brand new modern alternative to 2018-era BERT released by answer.ai/ simonwillison.net/2024/Dec/24/

Daniel

@simon Amazing! That's the hands-on practical work we need right now!

It's fascinating that a small team can come along, use a few tricks of the trade, train it on eight GPUs, and massively push state of the art. That's similar to what happened with resnet in the vision domain where folks went back a few times over the yeas and showed how it can be improved considerably based on what we learned.

Looking forward to having this power a ColBERT-like retrieval setup!

Simon Willison

It turns out OpenAI have a GitHub repository with a 26,000 line YAML OpenAPI schema describing their full API - the same API that's emulated by all sorts of other tools within the LLM ecosystem. Made some notes on that here, plus a YAML exploration tool:
simonwillison.net/2024/Dec/22/

balloob

@simon I wish it was standardized as a standalone LLM API. That way it can be expanded with use cases that OpenAI doesn’t cover, and standalone SDKs can be made.

Reusing an API will eventually go wrong as owner of API will only make changes that fit their use cases.

Simon Willison

Just found out the hosted Swagger explorer has a ?url= parameter that can load an external schema, so here's that OpenAI OpenAPI description rendered using that petstore.swagger.io/?url=https

Simon Willison

Published some detailed notes on my current approach to running my link blog simonwillison.net/2024/Dec/22/

Dan Burzo

@simon Hah, not a linkblog, but just this minute I pushed a new Notes section on my website (and your blog is among my inspirations/aspirations): danburzo.ro/notes/a-note-on-fe

kevin 🦣 ✨ (he/him)

@simon I used to do this in a section on my blog called “RE” kevingimbel.de/blog/category:R

But I’ve wanted to connect it to my LinkAce instance which I use for storing links & sharing them on Mastodon and Bluesky. I agree it’s a good thing to have these sorts of posts!

raffaele

@simon Thank you for the inspiration. I opened my linkblog with Snac, a minimal ActivityPub server href.literarymachin.es/raffael
Notes on how I run it: literarymachin.es/linkblog-fed

Simon Willison

Rewatching Severance in preparation for season 2 starting on January the 19th - it rewatches *really well*. I'm running a rewatch series on MetaFilter FanFare here, with a new episode every three days - just posted S1E2 fanfare.metafilter.com/show/se

Evan Prodromou

@simon I watched it twice; once solo and once with my family. It was still riveting. Great seeing them go through the high-adrenaline season finale!

Katy Swain

@simon I rewatched #Severance immediately after first viewing. Damn, it is good TV. Later, having heard it was renewed, I rewatched it again in the expectation it would arrive about a year after the first, only to check Wikipedia and exclaim "_2025?!_ WTF?"

I'll try to catch you up. Currently frantically rewatching S1 of Silo, because I hadn't noticed S2 had started.

Quality US TV arrives all at once like buses. Must be something to do with some inscrutable custom like sweeps week.

Simon Willison

Wrote up some notes on Clay, a fascinating ~2,000 line dependency-free C layout engine project that can be (inadvisably) run via WebAssembly to define the front-end of a website entirely in C simonwillison.net/2024/Dec/21/

Show previous comments
Tymscar :linux:

@simon Another thing that is annoying about it is that on mobile if you have extensions to darken the page, they don’t work when in the canvas version.
Also selecting text and images is just not really possible.
It’s not the way I’d like the web to go, BUT it’s a very interesting project nonetheless!

Beady Belle Fanchannel

@simon I mean yes, but blind people hate this trick

the clay-generated html, a bunch of `div`s with attributes that paint things as they should be displayed (no ARIA tags)
Simon Willison

Since I'll be watching it anyway, and I built a live blogging system a few months ago, I'm going to run a live blog during today's final event in the "12 days of OpenAI" series - starting in about 18 minutes simonwillison.net/2024/Dec/20/

Jeff Triplett

@simon I need to look into this for maybe my office hours or some other live blogging things that could be fun.

Simon Willison

OK, all done (I just went through and added alt text to the images with the help of Claude)

Simon Willison

My weeknotes are pretty much a howl of despair at how little I've been able to get done between keeping up with the wild array of LLM releases over the past few weeks simonwillison.net/2024/Dec/20/

Carlton Gibson 🇪🇺

@simon if it’s any consolation, I thought your one-shot Python scripts post was simply top notch. Amazingly helpful, so thank you! 🎁

Simon Willison

Sent out the latest edition of my newsletter... WOW a lot of things happened in the past week! simonw.substack.com/p/gemini-2

Xing Shi Cai

@simon I give gemini-2.0-flash-thinking-exp the following problem:

> Given the following conditions, how many ways can Professor Y assign 6 different books to 4 different students?
>
> - The most expensive book must be assigned to student X.
> - Each student must receive at least one book.

It gave the correct answer 390. This is the only model besides gpt-o1 which can answer this question. #llm

Simon Willison

(I ended up making my own little word counter thing (via Claude) to help me fit my proposal in the 300 word recommended limit tools.simonwillison.net/word-c )

Simon Willison

40 minutes left! Still time to get something in if you hurry!

Simon Willison

The first Gemini 2.0 Flash "Thinking Mode" model came out today. I've updated my llm-gemini plugin to support it and ran a few test prompts - it's a very interesting new entrant in the o1-inspired "inference scaling" category of models.
simonwillison.net/2024/Dec/19/

Simon Willison

The most impressive example I've seen so far involves vision input:

llm -m gemini-2.0-flash-thinking-exp-1219 \
-a http''s://storage.googleapis.com/generativeai-downloads/images/geometry.png \
"What's the area of the overlapping region?"

Geometric diagram showing a blue circle with radius 3 intersected by a green right triangle. The triangle has side lengths of 6 and the right angled corner of the triangle is positioned on the central point of the circle.
Text showing math solution steps. The overlapping region is a sector of the circle. The angle of this sector is the angle between the two legs of the right triangle, which is 90 degrees. The area of a sector of a circle is given by the formula: Area of sector = θ/360 × πr² where θ is the central angle of the sector in degrees, and r is the radius of the circle. In this case, θ = 90 degrees and r = 3. Area of overlapping region = 90/360 × π(3)² Area of overlapping region = 1/4 × 9π Area of overlapping region = 9π/4 Final Answer: The final answer is 9π/4
Simon Willison

I figured out a prompting pattern for getting Claude to produce fully self-contained Python scripts that execute with "uv run" using PEP 723 inline script dependencies - and now I can one-shot useful Python utilities with it simonwillison.net/2024/Dec/19/

Simon Willison

Here are my custom instructions which I'm using as part of a Claude Project, but I expect they'll work the same way with other LLMs too

You write Python tools as single files. They always start with this comment:

# /// script
# requires-python = ">=3.12"
# ///
These files can include dependencies on libraries such as Click. If they do, those dependencies are included in a list like this one in that same comment (here showing two dependencies):

# /// script
# requires-python = ">=3.12"
# dependencies = [
#     "click",
#     "sqlite-utils",
# ]
# ///
Tom Bortels

@simon

I'm a big fan of this style; below a certain level of complexity, single-file standalone scripts with the inline requirements - plus uv - are a game changer in being able to easily share and deploy things for non-python developer users.

Simon Willison

GitHub added a permanent free tier for GitHub Copilot today, including access to both GPT-4o and Claude 3.5 Sonnet. My notes here: simonwillison.net/2024/Dec/18/

Thomas Vander Wal

@simon A couple weeks ago I switched GH Copilot to Claude, but not tried it yet (ChatGPT kept making large messes of my code and I’d manually update and use Claude to debug if needed).

I was really close to dropping paying for Copilot as I pay for Claude.

Free with GPT doesn't get me far.

Have you tried the switching of Copilot to Claude yet?

Simon Willison

OpenAI released a new WebRTC mechanism for talking to their streaming audio API today - I built a live demo of it (using Claude) and wrote up some notes on my blog
simonwillison.net/2024/Dec/17/

Simon Willison

Google's new Veo 2 text-to-video model just did a pretty great job at my "A pelican riding a bicycle along a coastal path overlooking a harbor" test prompt

simonwillison.net/2024/Dec/16/

Thomas Steiner :chrome:

@simon Your prompt may have become part of the things they do QA on before releasing now. 😅

Simon Willison

The team behind the Chatbot Arena LLM leaderboard just released a new variant: web.lmarena.ai/

This one tests models on their React, TypeScript and Tailwind abilities. My notes (including a leaked copy of the system prompt) here: simonwillison.net/2024/Dec/16/

Simon Willison

Wrote up some notes on Microsoft's new Phi-4 LLM. They trained it on a LOT of synthetic data, and the details of how and why they did that are really interesting.
simonwillison.net/2024/Dec/15/

Simon Willison

I ported Matt Might's bash scripts for detecting common issues in writing to a little web app (using Claude) and it's pretty fun to play with: simonwillison.net/2024/Dec/14/

Timothée Mazzucotelli :python:

@simon thanks!

I pasted a Markdown page, and hints seems to be shifted somehow? They don't show the "passive voice" (see screenshot). Anyway this is already useful with just the highlighted words so not critical ^^ Thanks for sharing!

Matt Burke

@simon have you seen vale.sh/ - a linter for prose. I use it to edit my blogs

Go Up