- Pass the question to ChatGPT and ask it to provide keywords
- Use the Xata search functionality to retrieve the most relevant docs
- Form a prompt using this context and the question and pass it to ChatGPT
- This blog post provides more details on the general approach
All the code is open source: https://github.com/xataio/ask-your-stackThe web-crawler can be found here: https://github.com/tsg/xata-crawler
I think this is similar to GitHub Copilot for Docs but I don't have access to it.