The leaders at your company are having strategic conversations about AI and the future shape of digital work. But how do you get from a strategic conversation to an actual use case? By asking how AI can improve user’s daily lives, right now.
Recently, I was speaking with one of our customer champions about AI use cases with regard to Skuid, and they gave me a very practical example: an AI chat experience with a PDF document. Essentially, they wanted their users to be able to ask questions about processes directly within their policies and procedures manuals. That way, they could quickly answer any questions or concerns while onsite with a client. And with a library of prebuilt components that make it easy for users to read and enter data that “talks'' with an API, Skuid’s a great fit for building this type of experience.
So, let’s talk through some of the details of this use case and why it’s helpful, and then we can get into the elements of the solution and how Skuid makes it fast and easy to set up.
Selecting the right tools
As anyone who has ever browsed through a user manual or policies and procedures document knows, it can be hard to find the exact information you’re looking for – and if you don’t know the exact wording, ctrl+F will only get you so far. It gets even more frustrating if you need the answer ASAP. With today’s AI capabilities, however, users can “chat” with these often-lengthy documents and get the required info within seconds.
Users wanted quick, verified answers from company procedures and policies with regard to processes, best practices, compliance, etc. Because we’re trying to deliver a better experience than what a typical document search can offer, and because we can’t know what the users are going to ask, a generative AI model would be best. arge language models (LLMs) like ChatGPT are trained on this kind of content, and would allow users to enter prompts and/or describe what they need using everyday language.
One promising generative AI option for this particular use case was ChatPDF. This third-party tool is a freemium product that allows users to chat with either a self-uploaded or cloud-accessible PDF. The solution is powered by OpenAI, the company behind ChatGPT and DALL-E 2. More importantly, ChatPDF offers an API that allows for integrating its service into a Skuid app.
However, there were a few limitations associated with ChatPDF. For one, it only supports chat with one PDF at a time. In addition, ChatPDF can access files via a URL, but can’t navigate complex folder structures. Finally, it only works with PDFs, not videos, photos, or other content.
But our goal was really just to prove out the concept, and these limitations weren’t a major barrier. We ultimately decided to go with ChatPDF for a few reasons. First and foremost was API accessibility – there are a number of PDF chat products out there, but ChatPDF has API documentation that made it easy for us to connect to in a Skuid page. (Pro tip: when evaluating possible Skuid solutions, check platforms’ and services’ documentations. If the API is well-documented, chances are you can turn that data into a great Skuid page.) Second was security: ChatPDF files can be uploaded and locked with a password, and with Skuid, builders can securely embed credentials so that only authorized users can chat with the PDF. Third, responses from ChatPDF list the page in the document where information is pulled from. This is important because it means that the information can be verified.
And finally, ChatPDF offered a minimum viable product (MVP). Both the API for ChatPDF and security model are fairly basic – but in this case, less is more. We were looking to prove out a concept and decided to choose the fastest route. For an enterprise solution, other products with broader functionality may be a better fit.
After selecting ChatPDF as our generative AI tool of choice, we got to work building out our solution. The first step is to connect ChatPDF with Skuid via an API key (detailed instructions here). Next, create a Skuid data source by going to your Skuid site and setting up a data source with the following properties:
- Name: ChatPDF
- Data Source Type: REST
- URL: https://api.chatpdf.com
- Authentication Method: No Authentication
- Use (Apex) Proxy: Checked
Also, append the following key-value pair in the Common Request Parameters section:
- x-api-key: <paste your API key here>
To import a design system, download this file and use the Import function on the Design System page to add this system to your org. Then, import a Skuid page by copying the XML from this page, or save it as an XML file, and upload it as a new page in Skuid's pages list.
Why a Design System? Skuid’s Design System Studio lets teams create and import design systems that control the style, look and feel for all of the pages within an app. This can all be done in Design System Studio with zero code, CSS or HTML. For something like a chat experience, we want the text to be readable and forms to look and feel a certain way, and so we built a design system that was inspired in part by the ChatGPT experience.
Now that all of the necessary connections are set up, you’ll need to configure the chat experience. In the Skuid page, after the user submits a URL, it'll send the URL to the ChatPDF API which then returns an id to reference for the chat session. The “chat” part itself is powered by ChatGPT. The application uses two sets of Skuid models, and the second set is used for the Chat function:
- UI-Only “Chat Thread Display” model. This model will show the output from the ChatGPT interaction and hold the full thread of the discussion.
- REST model for interacting with ChatGPT. This model will handle the communication with the Chat engine.
In addition, two JS snippets are required for interacting with this data source:
- requestBody: This snippet creates the request body in the format necessary for submitting to the OpenAI API.
- responseSnippet: This snippet intercepts the return from ChatGPT and adds it as a new row to the Thread Display model.
Once all of this is set up, users can enter prompts and receive responses based on the data contained in the reference PDF, all within a single interface.
Additional applications: the sky’s the limit
The above is just one potential use case for AI + Skuid. You can create something similar for employees to look up key HR information within company manuals, for sales reps to ask for the next steps in your chosen sales methodology, or for partners to find the customer messaging they need. Really, the possibilities are endless!
Want us to guide you through combining AI capabilities with your Skuid applications, or have an idea you’d like to implement? Contact your us today.
Use AI to your app’s advantage
No matter what type of application you’re building in Skuid, our platform’s AI capabilities and OpenAI integration can help you transform your UX for the better. Here are some resources to get you started:
- OpenAI Integration with Skuid
- Using prompt engineering to enhance UX
- Skuid Docs: Models
- Skuid Docs: REST data sources
- Skuid Labs: OpenAI data sources
- Skuid Labs: Reusable action sequences