Show HN: Turn any website into a knowledge base for LLMs (embedding.io)

305 points by tompec ↗ HN
I built this tool because I wanted a way to just take a bunch of URLs or domains, and query their content in RAG applications.

It takes away the pain of crawling, extracting content, chunking, vectorizing, and updating periodically.

I'm curious to see if it can be useful to others. I meant to launch this six months ago but life got in the way...

134 comments

[ 4.3 ms ] story [ 204 ms ] thread
how does this work?
Give it URLs or domains, and it will crawl and extract their content, embed them in a vector database, and give you an endpoint that you can then query when doing RAG stuff or semantic search.
But how does it work in the background? What‘s the tech stack?
In another comment:

> Tech stack is a mix of serverless Laravel, with Cloudflare and AWS functions, and some Pinecone for vector storage. Still experimenting on a few things but don't want to over-engineer unless I know where I'm going.

I do this with https://mitta.ai by using a Playwright container that does a callback to a pipeline that uses either meta data from the PDF or sends it to an EasyOCR deployment on a GPU instance on Google for text extraction. Then I use a custom chunker and instructor/xl embeddings.

All of that code is Open Source, and works well for most sites. Some sites block Google IPs, but the Playwright container can run locally, so should be able to work around it with some minimal effort.

(comment deleted)
Interesting, I wanted to do this for a personal use case (mostly learning), but with PDFs. What's tech stack? I have explored using the AWS AI tools, but it seems a bit overkill for what I want it to do.
Tech stack is a mix of serverless Laravel, with Cloudflare and AWS functions, and some Pinecone for vector storage. Still experimenting on a few things but don't want to over-engineer unless I know where I'm going.
Given that cloudflare spies on traffic and reports to multiple agencies on it's findings, perhaps a breakdown of the chain and the privacy implications of each block in the stack would be beneficial?
Ya know, a downvote on this pre-aug 2019 would be fine.

people still being ignorant about their publicly posted policies 5 years later is annoying.

If the PDFS are textual or have OCR, then pdf2text from the Poppler suite ought to be enough? If not, add Tesseract/ocrmypdf to the pipeline?
Is there a way to deal with websites where you need to login? Like subscription based sites?
Unless you own those sites, I'm afraid that's not going to be possible.
But if I do own those sites, there’s a way?
This is interesting. Can it work with any website, even say document repositories hosted on standard servers like gitbook?
It works with pretty much any website, and works well with docs hosted on GitBook yes, I have embedded a website that's hosted there.
Confirmation email doesn't work, so cannot try it. I attemtped twice and checked spam
Apologies, please email me at support at embedding.io. If you have something you'd like embedded, please also mention it so I can set it up for you.
Nice! What's the underlying model / RAG approach being used? Be good to understand that part as presumably it will have a big impact on performance / usability of the results.
Does it hallucinate much?
This looks interesting, but I get a 404 on the iframe when I try to go into the chat.
(comment deleted)
Sorry about that, a bit too much load at the moment
I tried it out. This would be extremely useful to me to the point I'd be willing to happily pay for it, as it's something I would have otherwise had to spend a long time hacking together.

1) The returned output from a query seems pretty limited in length and breadth.

2) No apparent way to adjust my prompts to improve/adjust the output e.g. not really 'conversational' (not sure if that is your intent)

Otherwise keep developing and be sure to push update notifications to your new mailing list! ;-)

Agree with this. I also think the emphasis here (to OP) should be "I'd be willing to happily pay for it" - ie I'd rather be paying a reasonable amount each month for something that is going to remain active that have the large (current) disparity between "free" and "enterprise". I'd say make some middle tiers of (I don't know?) $5 / $10 / $20 a month for reasonable numbers of queries or whatever. Keep the "enterprise" offering there for the biggies, but offer us small players some hope that this will be sufficiently funded / supported.

Brilliant idea, btw, I like it :-)

Thanks! I'm still figuring things out about pricing, but there will be small plans available.
Thanks! The chat demo is actually just a small thing I put together as a preview of what can be done, but the main product is the API. But seeing that most users seem to like that, there's probably something there... If you want to email me at support at embedding.io with some requirements, I can see how to make that work for you.
Does this respect robots.txt?
(comment deleted)
Valid question and I am sure it doesn't.
I hope this gets answered.

Also I've checked their docs to see if there is any mention about the user agents or IP ranges they use for scraping, with no luck.

It does respect robots.txt when crawling. I'll add more details about this in the docs.
I appreciate the reply. As someone who runs multiple CMSs it’s painful to deal with the ai crawlers these days. Specially the ones that don’t respect my terms.
I like this. Abstracting away the management of embeddings and vector database is something I desperately want, and adding in website crawling is useful as well.
How do I feed it a sitemap?
It currently will try to find a sitemap on its own. But I have on the roadmap to let users add their own.
I like this a lot!

But: I feel the more of these services come to being, the more likely it is that every website starts putting up gates to keep the bots away.

Sort of like a weird GenAI take on Cixin Liu's Dark Forest hypothesis (https://en.wikipedia.org/wiki/Dark_forest_hypothesis).

(Edited to add a reference.)

Responding just because it's a pet peeve of mine: Cixin Liu did not invent the dark forest hypothesis. People were discussing it, and writing science fiction books about it, for decades before the 3BP books were published. Nothing against him, and he definitely helped popularize the concept, but I think it's incorrect to refer to it as "Cixin Liu's hypothesis".
But he is responsible for the name, not the concept. So yes it is Cixin Liu's Dark Forest hypothesis.
Just like Amerigo Vespucci put the name "America" on a map and people starting referring to the New World as such, although he didn't discover it himself.
Was curious as a lover of the 3BP series, google gave me this:

"We've been sitting in our tree chirping like foolish birds for over a century now, wondering why no other birds answered. The galactic skies are full of hawks, that's why." (The Forge of God, Legend edition, 1989, pg 315).

Yeah, same concept and even the same imagery.

Source: https://warwick.ac.uk/fac/sci/physics/research/astro/people/...

The Forge of God and its sequel, Anvil of the Stars, are amazing books for anyone interested in the dark forest theory, by the way. A bit slow and contemplative, so you have to be in the right mood, but they're one of my favorite reads of the last few years.

I think there's a passage that even uses an analogy of a forest, though I'm not sure.

> I feel the more of these services come to being, the more likely it is that every website starts putting up gates to keep the bots away

That's why we need microtransactions, because I'd rather be able to have both nice AI services and useful data repositories that they pull from, than have to choose just one. (and that one would be AI services, because you can't stop all the scrapers, so data sources will just keep tightening their restrictions)

We're never going to have microtransactions because of microfraud - and AI makes this problem worse rather than better.
What is this thing you've invented, "microfraud", and where's the evidence it exists?
All financial transactions have a fraud risk. Microtransactions are no different. But any microtransaction system faces a choice: continually pop up payment confirmations (unusably annoying), or automatically accept charges (vulnerable to fraud).

Click fraud on adverts is a form of microfraud, and pay-per-click is the existing form of microtransaction.

There's zero evidence that this exists, if only because there's very few examples of working microtransactions systems at all. Adverts are not micro transactions. (I don't care how you want to use that word - nobody else uses it like that)

But, all of the systems that I've seen (Blendle, video games) have had no problem at all with fraud, and a very small amount of annoyance to value delivered.

There's simply no reason to believe that this will be a problem, either empirically or theoretically.

"I'm going to build a system for transferring money, and I am confident that nobody will ever try to defraud it" -- someone who is about to lose all their money

Previously: https://news.ycombinator.com/item?id=15592192

Unsolved, difficult problems of micropayments:

- pay before viewing: how do you know that the thing you're paying for is the thing that you're expecting? What if it's a rickroll or goatse?

- so do you give refunds a la steam?

- pay and adverts: double-dipping is very annoying

- pay and adverts: how do you know who you're paying? A page appears with a micropayment request, but how do you know you've not just paid the advertiser to view their ad?

- pay and frame: can you have multiple payees per displayed page? (this has good and bad ideas)

- pay and popups: it's going to be like those notification or app install modals, yet another annoyance for people to bounce off

- pay limits: contactless has a £30 limit here. Would you have the same payment system suitable for $.01 payments and $1000 payments? How easy is it to trick people into paying over the odds (see refunds)?

- pay and censors: who's excluded from the payment system? Why?

> If it was that easy, it would have been done.

Part 2: business model problems!

- getting money into the system is plagued by usual fraud problems of card TX for pure digital goods

- nobody wants to build a federated system; everyone wants to build a Play/Apple/Steam store where they take 30%

- winner-take-all effects are strong

- Play store et al already exist, why not use that?

- Free substitute goods are just a click away

- Consumers will pirate anything no matter how cheap the original is

- No real consumer demand for micropayments

=> lemma from previous 3 items: market for online goods is efficient enough to drive all marginal prices to zero

- existing problem of the play store letting your kid spend all the money

- friction: it would be great if you didn't have to repeatedly approve things, such as a micropayment for every page of a webcomic archive. But blanket approval lets bad actors drain the jar or inattentive users waste it and then feel conned

- first most obvious model for making this work is porn, which is inevitably blacklisted by the payment processors, has a worse environment for fraud/chargebacks, and is toxic to VCs (see Patreon and even Craigslist)

- Internet has actually killed previously working micro-ish payment systems such as Minitel, paid ringtones (anyone remember the dark era of Crazy Frog?); surviving ones like premium SMS and phone have a scammy, seedy feel.

- accounting requirements: do you have to pay VAT on that micropayment? do you have to declare it? Is it a federal offence to sell something to an Iranian or North Korean for one cent?

> "I'm going to build a system for transferring money, and I am confident that nobody will ever try to defraud it" -- someone who is about to lose all their money

You seem to have conjured the impression that micropayment systems have to be radically different than current payment models, which is wildly mistaken.

You can build an effective micropayment system using only currently available tools (digital wallets, microcurrencies, digital storefronts, review systems) that have most/all of the nice properties of existing platforms, which invalidates almost every single point you make.

Few of these points seem very well thought-out - they're mostly relatively easily refuted by using logic and/or pointing to what the industry is already doing.

> pay before viewing: how do you know that the thing you're paying for is the thing that you're expecting?

In the exact same way as current digital storefronts.

> How easy is it to trick people into paying over the odds

What are "the odds"? Are we betting now?

> so do you give refunds a la steam?

Yes, exactly like current digital storefronts.

> - pay and adverts: double-dipping is very annoying

Exactly like current digital platforms (e.g. Spotify, YouTube premium).

> - pay and adverts: how do you know who you're paying?

What does this even mean - how do "adverts" factor in to "how do you know who you're paying"??

> pay and frame: can you have multiple payees per displayed page?

What does this mean??

> - pay and popups: it's going to be like those notification or app install modals, yet another annoyance for people to bounce off

A theory that is trivially dispelled by empirical evidence of the tens of billions of dollars in microtransactions that US players spend on free-to-play games. You create a microtransaction wallet currency that is roughly equivalent to normal money, and then you pay for things by clicking on them, like in a normal game with microtransactions. Empirically, people get used to this very quickly and the friction becomes unnoticeable.

> - pay limits: contactless has a £30 limit here

What does any of this have to do with contactless payments???

> Would you have the same payment system suitable for $.01 payments and $1000 payments?

It's pretty easy with a few seconds of thought to think of systems that handle both of those cases well. For instance, you can make it so you have to hold down a button to purchase something with your microcurrency, with the duration of the hold (nonlinearly) proportional to the cost of the item.

> - pay and censors: who's excluded from the payment system? Why?

Exactly the same as current platforms - the platforms/wallet providers determine that.

>> If it was that easy, it would have been done.

Objectively false. There are many good ideas that have failed because of market factors or poor marketing. In this case, the prevalence of ads, and people's generosity at a time before scraping has truly taken off, is subsidizing the market. The generosity will decrease and doesn't scale, and I shouldn't have to point out the problems with ads.

> - getting money into the system is plagued by usual fraud problems of card TX for pure digital goods

So you handle that exactly the same way as current platforms - you use a payment processor.

> - nobody wants to build a federated system; everyone wants to build a Play/Apple/Steam store where they take 30%

I have to pay 30% already. I'd rather pay directly than with my eyeballs and brain (through ads). This is a problem, but it's better to implement a solution, and then lobby for regulation requiring an open, interoperable payment protocol.

> - winner-take-all effects are strong

Sure? We have the same problem for ads and platforms currently.

> - Play store et al already exist, why not use that?

This was already answered by vlehto in a r...

> You seem to have conjured the impression that micropayment systems have to be radically different than current payment models, which is wildly mistaken.

His claim is that the existing system has fraud, therefore micro-transactions will have analogous thing he named "micro-fraud" — so you agree with him now?

Can this be deployed on-prem or is it an cloud-toy?
Currently just a cloud-toy.
Can I query multiple vectorized websites at once? Can I export vectorized websites and host them myself? Any chance to export them to a no-code format, like PDF?
You can group as many websites as you want into a collection. Then query that collection. Not sure what you mean by exporting; you would like to export the vectors themselves? Or just the chunks of text from the websites?
I find it interesting that as an (edit: UK) academic researcher, I would be likely be forbidden to use tools like this, that fail basic ethics standards, regulations such as GDPR, and practical standards such as respecting robots.txt [given there's no information on embedding.io, it's unlikely I can block the crawler when designing a website].

There's still room for an ethical development of such crawlers and technologies, but it needs to be consent-first, with strong ethical and legal standards. The crazy development of such tools has been a massive issue for a number of small online organisations that struggle with poorly implemented or maintained bots (as discussed for OpenStreetMap or Read The Docs).

I'm less convinced. Are you saying it's unethical to automate browsing a site?

Because if you save the pages you browse on some site, they're yours (authors don't own your cache).

Perhaps you're arguing that if you wrote a lightweight script/browser (which is just your user agent) to save some website for offline use, that'd be unethical and GDPR violating? Again, I don't think so but maybe I'm missing something. But perhaps this turns on what defines a "user agent".

Perhaps this becomes a "depth of pre-fetch" question. If your browser prefetches linked pages, that's "automated" downloading, akin to the script approach above. Downloading. To your cache. Which you own. (Where I struggle to see an ethical violation)

Genuinely curious where the line is, or what exactly here is triggering ethics, GDPR and practical standards?

Maybe a good illustration would be ClearView AI. They are scraping websites, extracting information (images), and training ML models to learn embeddings (distance between faces). They indiscriminately collect personal data without opt-in, but a limited opt-out mechanism.

In this case, if this tool is used to scrape a website, there are too direct issues: 1/ no immediate way for the website owner to exclude this particular scraper (what is the useragent?) 2/ no way for data subjects (whose data is present on the website) to search whether the scraper learned their personal data in the embeddings. Data being available publicly doesn't mean it can be widely used [at least outside the US, where we have much stricter rules on scraping].

> Enterprise: Contact Us

If there is no certifications or compliance information then I don't think there is anything to discuss about any enterprise plan.

Gotta start somewhere :)
I spent a lot of time thinking about how to manage embeddings for docs sites. This is basically the same solution that I landed on but never got around to shipping as a general-purpose product.

A key question that the docs should answer (and perhaps the "How it works" page too): chunking. You generate an embedding for the entire page? Or do you generate embeddings for sections? And what's the size limit per page? Some of our docs pages have thousands of words per page. I'm doubtful you can ingest all that, let alone whether the embedding would be that useful in practice.

I chunk pages and generate embeddings for each chunk. So there's no real size limit per page.
The more detail, the better. If `<section>` elements are found you chunk those? Do you do it recursively or do you stop after a certain level? And when section elements don't exist, you use `<h1>`, `<h2>`, etc. to infer logical chunks?
Having looked at a lot of HTMLs, I noticed that sections are not really the default. I rely on headings (h1, h2, ...) to chunk each pages. Each chunk has its heading hierarchy attached to it. There are a lot of optimizations that could be done at that level.
i'm just guessing but i would think following whatever semantics leads to the highest search rank in google's algorithm would be what you're most likely to find out in the wild.
Which LLM model is it using?
(comment deleted)
In my opinion this is a transitional niche.

Soon websites/apps whatever you want to call them will have their own built-in handling for AI.

It's inefficient and rude to be scraping pages for content. Especially for profit.

I doubt. For larger players, data is valuable - so they are preventing scraping already (eg reddit, linkedin). For smaller websites there’s also not much of an incentive.. Maybe hosting providers will help with preventing scraping? like ddos protection
I think each website/data-source having their own built-in AI is also a transitional period.

It is like every website having search engine vs google.

We already have the google analogue (llm that's seen all the websites), so are we going in circles?
In agree that this niche is DOA. No offence to OP but the barrier for entry to this stuff is low. I built basically the same thing over a weekend for personal use. React frontend, python server, chroma for embeddings, sqlite cache, switch between open AI and anthropic (I want to add llama for full local execution when I get a better pc). I have a local SPA with named "projects", can configure crawl depth from a start page, I can set my crawl rate, don't have to pay to use it, can choose any provider I want... I'm just one guy and that took a day to get working plus a bit of polish.

I would guess the hardest thing by far in developing the advertised product would be user management, authentication, payments and wrapping the subscription model's business logic around the core loop. And probably scaling, as running embeddings over hundreds of scraped pages adds up quickly when free tier users start hammering you.

My question when deciding to sell something I've built is, if building the service model is harder than building the actual service, where is the value add?

My take on the natural evolution is that collating and caching documents, websites etc for search (with source attribution ideally) is a problem that will I think ultimately be solved by OS vendors. Why sign up for SaaS and expose all your content to untrustworthy 3rd parties, when it's built right in and handled by your "trusty" OS.

In the meantime, I reckon someone more dedicated than me will (or probably already has) open source something like I built but better, probably as a CLI tool, which will eventually reach maturity and be stolen cough I mean adopted by the top end of town.

Ethically I think nothing's changed for centuries in regards to plagiarism and attribution. It gets easier to copy work and thinking, but it also ultimately gets easier to acknowledge sources. Good folk will do the right thing as they always have done.

Regarding efficiency, I think tools like this have a place in making access to relevant and summarised knowledge during general research more efficient, when doing the broad strokes to find areas of interest to zoom in on, when more traditional approaches take over.

Interesting times anyway. I have to give credit to people that try, but I'm taking a back seat in thinking of ideas to productise in this space, as by the time I've thought it through, something new comes along that instantly makes it obsolete.

God. Some people on hackernews suck.

This isn’t “niche”, it’s a pretty cool thing OP has built.

How about instead of commenting and trivialising what people have done, you say something positive

> the barrier for entry to this stuff is low. I built basically the same thing over a weekend for personal use. React frontend, python server, chroma for embeddings, sqlite cache

Lmfao. God bless HN for keeping this meme going for decades by now.

Your last paragraph really says it all. You haven’t accomplished anything in the space and you’re not willing to try. So you’re just going to hate on everyone who does.

Nobody cares how you would build it because you haven’t. At least not in any form that we can see.

[flagged]
(comment deleted)
#1. Gratuitous self promotion (but also my honest best advice): The future of knowledge bases is ScrollSets: https://sets.scroll.pub/

#2. If you are interested in knowledge bases, see #1

I feel like this is unethical. You built yet another bot scraper. It would only be an ethical tool if it validated I own the website I am scraping before it starts.
yes only big conglomerates now can scrape pages. If you're not google stealing the info then...... Right?
I didn't say that but a site owner should have the right to decide.

In addition, this scraper doesn't even identify itself (I checked). It pretends to be a normal browser, without saying it's a scraper.

I think a website owner can decide. They can take the site down, or they can put it behind some kind of user wall.
This is probably a losing direction - protecting your little island of content in the sea of internet and LLM outputs. Get more value by exposure. This is the trend of open source, wikipedia and open scientific publication. LLMs double down on the same collaborative approach to intelligence.

You can of course decouple from the big discussion and isolate your content with access restrictions, but the real interesting activity will be outside. Look for example the llama.cpp and other open source AI tools we have gotten recently. So much energy and enthusiasm, so much collaboration. Closed stuff doesn't get that level of energy.

I think IP laws are in for a reckoning, protecting creativity by restricting it is not the best idea in the world. There are better models. Copyright is anachronic, it was invented in the era of the printing press when copying was made easy, LLMs remix they don't simply copy, even the name is unfitting for the new reality. We need to rename it remixright.

> Get more value by exposure

The LLM era doesn't give credit or attribution to its sources. It erases exposure. So there's a disincentive to collaborate with it, because it only takes.

> I think IP laws are in for a reckoning, protecting creativity by restricting it is not the best idea in the world.

We've been having this discussion for over 20 years since the Napster era, or even the era of elaborate anti piracy measures for computer games distributed on tapes 40 years ago.

I've reached the conclusion that the stable equilibrium is "small shadow world": enough IP leakage for piracy and preservation, but on a noncommercial scale. We sit with our Plex boxes and our adblockers, knowing that 90% of the world isn't doing that and is paying for it. Too much control is an IP monopoly stranglehold where it costs multiple dollars to set a song as your phone ringtone or briefly heard background music gets your video vaporised off social media. Too _little_ control and eventually there is actually a real economic loss from piracy, and original content does not get made.

AI presents a third threat: unlimited pseudo-creative "slop", which is cheap and adequate to fill people's scrolling time but does not pay humans for its creation and atrophys the creative ecosystem.

Well, Google itself is just an unethical bot scrapper then...
Several lawsuits have confirmed that. Google regurgitating articles from French newspaper sites comes to mind.

This is not an easy problem to solve. In my naive take, authors get to decide how their work is used, not scrapers.

The French newspaper blatantly lied on how metadata tags works in the EU debates so I wouldn't trust them on this subject.

That was actually a big enlightening moment for me, as long as money is involved, the so called ethics were out of the window instantly. From the far left newspapers to the far right ones, they all lied on this topic. Only a handful tech blogs and newspapers did tell the truth.

> In my naive take, authors get to decide how their work is used, not scrapers.

Inasmuch as they've put it on the public web they've already made a decision on who gets to see it, and you really can't stop people from doing what they want with it on a personal level.

If that's print it out and put it on a wall in my house, or use whatever tools I have at my disposal to consume it in any way I please, there's not really anything the author can do about it.

Copyright law says otherwise. As for enforcing the law, you're right, it may be difficult for individual authors to move the needle. But that that doesn't mean it's ok for scrapers to violate the law.

As to what constitutes fair use, that's a whole other story: some scraping may be found to be legal while others may not. Benefiting monetarily from legally dubious scraping only makes that scraping look more infringe-y. Of course, nothing is settled law until a court decides.