Learning

How does WiselyDesk generate the answers?

Jay Chiarella 3 min read
#answers#generative AI#how-to-guide

Intended audience: Less-technical folks curious to have a simplified understanding of how we (and most generative AI chatbots) generate answers to questions.

Before we dive in, let’s cover some jargon.

Jargon explanation:

  1. Word Embedding: A column or set of numbers that represents text. Similar text should have similar numbers.

Simplified process of word embedding 3 text inputs. Looking at the results, which input is most different?

Word Embedding Demo
If you guessed "I like toast" as the most different, then you are correct!

We oversimplified, so be sure to keep learning :)

Two main tasks to generate answers:

WiselyDesk does a lot more than this under the hood. This is a simplified version to get the idea across.

1) Retrieve and parse Zendesk knowledge base articles:

Retrieve and parse Zendesk knowledge base articles
Diagram of task one

2) Generate a response based on relevant articles:

Generate a response based on relevant articles
Diagram of task two

And Voila! Once you have the prompt, send it to the AI model to receive an answer!

Semantic Search Explanation
Answer from OpenAI AI model

What AI model does WiselyDesk use?

We use OpenAI AI models (GPT3.5 and GPT4). We use two third party providers, OpenAI (obviously!), and Microsoft - who has a license to supply OpenAI AI models with their infrastructure. Dual providers allows us to ensure our software runs well even if one provider is having a bad day.

Alternatively, a more technical term:

We use retrieval augmentation with memory to generate a completion using LLMs.

Want to try a simplified version yourself?

If you want to try a simplified version of this yourself, then we would be happy to help you get started. We’ll use OpenAI API, Python, and Replit. The later two are free to use, and OpenAI comes with a $5 credit.

Pre-requisite:

  1. Basic Python knowledge (Can recommend codeacademy or Automate the boring stuff with python to learn)
  2. OpenAI API key - can sign on OpenAI’s webpage and receive $5 dollar credit.
  3. Sign up for Replit (free account).

How to get started:

  1. Fork our Replit to use in your account: https://replit.com/@JayChiarella1/Basic-QA-with-ZD-help-center-bot#main.py
  2. Create an OpenAI API key.
  3. In your forked Replit, scroll under the “tools” section at the bottom left -> click “secrets” and add your OpenAI API key with the key OPENAI_API_KEY (has to be exact) and the value from your key in your OpenAI account.
  4. Go back to your Replit and click run!

If you run into any trouble or would like help, please feel free to email us at hello@wiselydesk.com - we’re happy to spread some knowledge here!

Outro

We hope you learned a thing or two. We’ll have a discord server up and running soon, so you can ask us further question if something wasn’t clear or if you want to learn more!

← Back to Blog