There was a great line I couldn't quite remember from "One Hundred Years of Solitude" Search engines & ChatGPT couldn't recall it either from my bad description Wrote a little 20 line program to read the whole book and found it in a minute, cost 25 cents Wild times we live in

Dec 30, 2023 · 5:28 PM UTC

Being able to apply bulk ad-hoc intelligence to tasks like this makes so many things feasible that weren't before. Doing things like academic research where you need to crawl through huge tomes is going to get so fun and efficient.
Replying to @GrantSlatton
This is amazing with enormous potential for literary and archival research. Thanks for sharing, Grant.
It’s going to be so much easier to search digital archives with this tech. Put your dissertation topic into a program and kick off a script to run overnight and read a thousand books looking for relevant information.
Replying to @GrantSlatton
Didn't know about ai_fn before. Thanks for sharing!
@AskMarvinAI is a very useful little library for quick scripts like this
Replying to @GrantSlatton
curious if a text-embedding + cosine similarity would work well here too, then it'd be free!
Yep
For those allergic to paying for inference or who have data they may not want to send off to someone else's servers, this can easily be done locally. Using Nomic's Embed4All (which as far as I can tell is CPU-optimized SBert) and a cosine similarity search also finds the passage!
Replying to @GrantSlatton
Very interesting. For a total newbie, what are the tools here?
Replying to @benmaritz
This is using the @AskMarvinAI library from @AAAzzam which makes writing these types of little scripts trivial. Internally it's delegating to the @OpenAI API (gpt-3.5-turbo, specifically).
Replying to @GrantSlatton
Also dang that is a good quote
Hit me like a truck the first time I read it. Stuck with me all these years but forgot the exact wording!