LumApps (a Digital Workplace) offers a public documentation web site. It’s a gold mine, and we use it a lot, at Ariella Digital Consulting.
So we have
- dumped all of its content (you can use the lumapps toolbox OR use one of our crawlers)
- converted them to markdown
- split them to chunks (choosing the right size is paramount)
- cleaned them up (you know, that “Request a change on this documentation.” and a few others)
- converted the chunks to embeddings (multiqampnet, to be honest - it’s cheaper than OpenAI and does a great great great job)
- stored all the chunks in a vector database - we love Rust, hence qdrant was a match made in Paradise.
This is all for the information storage part
Whenever a user asks a question to our bot, we
- convert the question to embeddings,
- compute the closest items in qdrant,
- pick the 100 highest results.
- prepare a prompt (that’s developer lingo for “format the question in a way that will force OpenAI to answer without faking the answer and highlight the sources”)
- (the prompt includes as a context some of the previously selected results)
- send all this to our favourite Generative AI
We render on screen the OpenAI response.