quickest-silver
quickest-silverβ€’3y ago

Hey everyone Big Friday update with TWO

Hey everyone! Big Friday update with TWO new features πŸ’― 1. Full markdown response formatting for AI responses 🎨 2. Brand new API for your Knowledge Base - add/delete/retrieve documents all via an API πŸ€– We have lots more coming - would love to hear what you think! @Server Updates
15 Replies
eastern-cyan
eastern-cyanβ€’3y ago
Stoked!! What's the easiest way to make sure only a single chunk is created for a particular document I'm uploading? Not sure if there's an easy way to go from number of characters in a txt file to number of tokens since there's different conventions... @Sarah Bourgeois, LLM/KB PM any ideas?
future-harlequin
future-harlequinβ€’3y ago
Figured out a way to get the API setup for the upload file (non url) option. question is, how can i add the file upload option within the chat assistant where it can upload documents in the knowledge base? i tried using the capture block and the intent block but none seems to work. what should i do
afraid-scarlet
afraid-scarletβ€’3y ago
Full Markdown lets responses look professional, thanks! API for kb sounding good. Could you show an example how kb changes could be done externally?
national-gold
national-goldβ€’3y ago
can you please elaborate on your solution?
other-emerald
other-emeraldβ€’3y ago
Can you edit documents? Or if you wanted to dynamically update the KB, you would have to export to a file, and then upload a new document?
useful-bronze
useful-bronzeβ€’3y ago
as long as the document name is the same, it will overwrite the existing document in the KB
national-gold
national-goldβ€’3y ago
thanks a lot brother, clear as day. The thing is that I'm trying to get around the fact that users can't upload files. I am developing a bot for a big energy firm here, but its mandatory that this assistant get users energy bills and confirms it. Any ideas?
future-harlequin
future-harlequinβ€’3y ago
write the form for the energy bill where users can fill hp the form inside the bot, and the kb will verify it if the info was correct.
equal-aqua
equal-aquaβ€’3y ago
depending on the size of docs in your KB, I would recommend using the Upload Doc API and adjusting maxChunkSize to accommodate (default is 1000 tokens, range is 500-1500). You can use GET Document Chunk Retrieval to see the chunks for a doc now. we are currently modifying the Query API to allow you to specify the number of chunks you want sourced in a response. David are you sure you want only one chunk? costs could be lower on the token consumption if you have smaller chunks that are used in the query synthesis, even versus one BIG chunk. Food for though, not sure how big your docs are.
eastern-cyan
eastern-cyanβ€’3y ago
@Sarah Bourgeois, LLM/KB PM I completely agree with you. The ideal solution would be to create chunks and store an id and other properties in the metadata of each chunk so that we can a) connect the chunk to the source document and b) filter out chunks that don't fit certain properties. I haven't played with the api yet but I assume b) is not yet possible, how about a)?
equal-aqua
equal-aquaβ€’3y ago
the embedding, along with metadata (chunk content, chunk id, ...) is stored together in the vector db. the GET document chunk retrieval route will pull the chunk_id and content metadata for a document. and the POST query route will answer a question and display the chunks (and their id's) used. You can set a chunkLimit (number of chunks) as a query parameters in the POST query if you want to restrict to one but today you can't dictate which chunk that will be.
absent-sapphire
absent-sapphireβ€’3y ago
anyone figure out how to disable the chat box when buttons are available? to restrict the user input just to buttons?
eastern-cyan
eastern-cyanβ€’3y ago
Hey @Sarah Bourgeois, LLM/KB PM will the openapi spec be updated to include these new api calls soon? Would save some time for testing in other tools πŸ™‚

Did you find this page helpful?