Bonus Drop #8 (2023-03-26): Multi-threaded Edition v0.3.0

JSON Placeholder; Elicit; Lit

Weekend greetings and felicitations to ye supporters of the Drop!

We’ve got three diverse topics on tap for today.

The first one is for when you need data now; the middle shows off an open, honest, and useful AI tool; and, the last builds upon Friday’s “Weekend Project Edition”.

I was going to close this introduction with “time to make the donuts”, but that Dunkin’ Donuts commercial started airing in 1981 (and I really don’t like anything Dunkin’ makes).

I asked our AI Overlord what a modern alternative idiom might be, which is what I’m using to actually close the intro…

OK, time to grind!

JSON Placeholder

Whether you’re learning a new programming language/tool, putting together a tutorial, mocking some tests, or framing out a new application, it can be handy to have some non-proprietary data at the ready. Sanitizing your data extracts can be time-consuming and fraught with peril.

“Placeholder” data services is an entire genre on its own, and today we take a brief look at one of the members of said genre.

JSON Placeholder is a free-to-use site exposing an API that returns JSON for a handful of “database” tables:

  • /posts: 100 posts

  • /comments: 500 comments

  • /albums: 100 albums

  • /photos: 5,000 photos

  • /todos: 200 todos

  • /users: 10 users

It supports a few HTTP verbs; e.g.

  • GET /posts

  • GET /posts/1

  • GET /posts/1/comments

  • GET /comments?postId=1

  • POST /posts

  • PUT /posts/1

  • PATCH /posts/1

  • DELETE /posts/1

and is lightning fast.

It works by being a lightweight shim over a GitHub repo with a db.json file in it, and it makes that shim available to you via a sibling My JSON Server. You stick a small (or pay for the ability to use larger) db.json in one of your repos in a main branch, and the service provides the REST front end.

Simple and handy!

Elicit

person wearing black and gray jacket in front of bookshelf

ChatGPT’s knowledge gap increases with each passing day. This is more of a “problem” for folks like me who are trying to speed up learning new frameworks or recent concepts by treating ChatGPT’s conversational model the same way one might ask a tutor for guidance. I know ChatGPT makes **** up as it goes, but it does a respectable job for a decent percentage of topics I’m interested in. I always augment the results with some Kagi information archeology, just to make sure the stochastic parrot isn’t swindling me.

One reason why ChatGPT can give wrong answers is due to the data it was trained on. Humans are excellent at both making mistakes, and also making **** up that sounds authoritative, but is — in reality — hogwash.

I tripped over Elicit a few weeks ago and have been augmenting knowledge quests with it for both personal benefit and to give me some useful tidbits to discuss today.

Elicit is a research assistant that uses LLMs (like GPT-3)() to automate parts of your research workflow. Its core feature is the dreaded “literature review” task. If you ask a question, Elicit will show relevant papers and summaries of key information about those papers in an easy-to-use table.

Yes, you read that right. It’s not trained a corpus of internet blathering and wrong Stack Overflow answers or inane Reddit posts. Their model was trained (by Ought) on over 150 million papers from Semantic Scholar Academic Graph. Yes, there are garbage papers (something Ought openly discuss on the site). But this is still a much higher quality corpus, and they’ve appeared to work pretty hard on the prompts that initialize and power this main feature.

I made a few attempts to summarize their FAQ. I even burned some credits and asked Kagi’s re-launched summarization tool1 for aid. But, I am so taken with their well-crafted and frank explanations/descriptions that I would be doing a disservice to them with said summarization. I implore you to at least scan through it before continuing.2

The section header is the result of this question:

What is the impact on company valuation after they’ve had a data breach?

It achieved impressive results identifying relevant papers on this niche subject in my field, and even did a good job summarizing them:

The papers suggest that data breaches have a negative impact on a company’s market value. Acquisti (2006) found that data breaches have a negative and statistically significant impact on a company’s market value on the announcement day for the breach. The cumulative effect increases in magnitudes over the day following the breach announcement, but then decreases and loses statistical significance. Goel (2009) found that the announcement of a corporate security breach had a negative impact of about 1% of the market value of the firm during the days surrounding the event. Schatz (2016) argued that there is enough evidence to show that correlation exists between one or more information security breaches and an organization’s stock market value, especially for recurring security breaches. However, Ford (2021) found that the impact of data breach announcements on publicly listed companies in European markets was not statistically significant overall, except for the Spanish market, which appeared to be more sensitive to data breaches.

While lit-review is the core feature, Elicit has other Tasks it can perform for you. These “Tasks” are user-created prompts that can help you brainstorm research questions, summarize paragraphs, and rephrase snippets of text.

I 💙 exploring “failure modes” (ways that a plan could fail) of complex systems, and decided to see how well that Elicit Task performed on a topic that’s consumed the last half of my professional life:

I’m planning on setting up an internet-facing application in one of the popular cloud providers and will be exposing both the web server and database server directly to the internet. what are possible failure modes?

It also achieved impressive results at this:

  • People can’t access the website even if they’re behind a firewall or proxy

  • You don’t backup your data often enough and lose it all when you have some sort of hardware failure

  • Worrying about security flaws is distracting

  • Cloud provider going down

  • Gaining too much traffic and the application no longer serving requests within a reasonable amount of time

  • Public vulnerability scanners will find bugs

  • Someone finds a security hole and takes over your server

  • The application being hacked

It’s free and run by a non-profit organization that appears to be far, far less skeezy than OpenAI. I highly suggest giving it a go the next time you’re thinking of asking the parrot something.

Lit

Lit neon signage

We’ll be brief, here, since the topic of Web Components-proper was in Friday’s Drop, and just bullet through the highlights.

Lit is a web components library that adds reactivity, declarative templates, and other features to reduce boilerplate and make web development easier.

Their components are (ultimately) native web components, which means they work anywhere you use HTML, with any framework or no framework.

It has a tiny footprint (~5KB), and rendering is bonkers fast because it only touches the dynamic parts of your UI when updating.

Lit is ideal for building shareable components, design systems, or highly maintainable sites/apps. It also minimizes lock-in and promotes maintainability by fully embracing Web Components, allowing you to update or migrate one component at a time without disrupting development.

Finally, Lit offers “the usual” community resources: live tutorials, a Discord chat, Twitter, GitHub, and a Stack Overflow tag to help you stay up to date with new releases, learn more about how to use web components, and share projects and feedback with the team.

You can check out a small example I made, yesterday, with Lit and WebR. That experiment has a link to the source.

FIN

Thank y’all for your support! ☮

1

Kagi paid search users can read its summary of the Elicit FAQ.

2

This one example makes me sort of sad for folks who are just going to use AI summarization tools without also reading content themselves. While the summary is accurate, you miss out on the “vibe” you get from the whole FAQ.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.