Integrating AI into an existing SaaS
An AI assistant with permission-based access to internal knowledge
- 2025
- 6 min read
- SaaS
- AI/LLM
- Research

- Role
- UX/UI Designer
- Team
- 1 UX/UI designer · 3 backend developers · 1 frontend developer
- Timeline
- 6 weeks
- Year
- 2025
- Contribution
- Research & data analysis · User interface design · Python
An AI assistant with permission-based access to internal documents, integrated into an existing SaaS platform, researched, designed, evaluated, and delivered in six weeks.
- 6
- weeks from brief to delivery
- 8
- evaluation loops to hit the quality bar
- 37.8
- final avg. eval score out of 40
01, Overview
What does it take to ship an AI assistant in 6 weeks?
Our objective was to integrate an AI assistant into an existing SaaS product, giving it permission-based access to internal documents so it could answer questions using the knowledge base. However, much of the user experience depended on AI behaviour that we could not fully predict.
02, Making do with limited insight
The company uses the platform internally in the same way its clients do
We had neither the time nor access to the client's external users. However, the company used its own platform internally in the same way its clients did. While defining the exact requirements with stakeholders, we also discussed their pain points. I pushed to speak with internal users and conducted six interviews with people in key roles. Stakeholders saw the AI chat as another way to search internal documents, and the interviews confirmed that finding specific documents was both frustrating and necessary several times a day.
Requirements
- The AI assistant is easily discoverable and intuitive to use
- The AI assistant has access to internal documentation and responds to queries using the information it contains
- The AI assistant's access is restricted by regular user permissions
Pain points
- The search function is unreliable and often requires exact wording to find relevant articles
- The internal knowledge base has hundreds of articles, looking them up takes time away from other tasks
- Users rely on bookmarks to find key articles because the search is unreliable
03, A key challenge
How do we get the AI to behave as intended?
An AI assistant is only as good as its answers. Left to its own devices, the model rambled, drifted in tone, and would confidently offer answers it never found in the knowledge base. Before the interface could earn anyone's trust, the AI's behaviour had to become predictable enough to design around.
In a typical project, I define every interaction, from where users click to the output they see. With an AI chatbot, however, much of the user experience depends on how the AI communicates. Whether users continue using an AI feature largely depends on how the conversation feels, yet generative output is difficult to control by nature.
04, Leveraging my coding skills
The project arrived at an opportune time. Having recently completed the IBM AI Developer course, I saw a chance to address this part of the user experience too. While I waited for stakeholder feedback and the developers familiarized themselves with the system, I built a Python evaluation system to improve the AI's responses.
The script uses LLM-as-a-judge and few-shot prompting. It asks the assistant model (Llama 3) questions from a database in sequence and provides semantically relevant articles it can use to craft each response. A separate judge model (Claude) then compares each answer with the question and source articles, scoring it against an evaluation framework. The assistant is rated on conciseness, factuality, professionalism, and retrieval accuracy, for a maximum of 40 points.
After the initial round, the five best and worst responses are stored as examples and passed to the assistant in subsequent loops. Once all 20 questions have been answered, the script checks whether the average score is at least 35. If not, the judge model updates the assistant's prompt and starts a new evaluation round.
def evaluation(df, previous_results=None): results = [] if previous_results is not None: examples_csv = previous_results.to_csv(index=False) llama_prompt_with_examples = ( llama_basic_prompt + "\n\nPREVIOUS RESULTS:\n" + examples_csv ) else: llama_prompt_with_examples = llama_basic_prompt for index, row in df.iterrows(): question_id = row["question_id"] question_text = row["question"] correct_article_id = row["correct_article_id"]def retrieve_articles(question_text): results = articles_collection.query( query_texts=[question_text], n_results=TOP_K, ) articles_text = "" for doc, metadata in zip( results["documents"][0], results["metadatas"][0], ): articles_text += f"ARTICLE ID: {metadata['article_id']}\n" articles_text += f"TITLE: {metadata['title']}\n" articles_text += f"CONTENT: {doc}\n\n" return articles_text05, The evaluation results
One evaluation loop using my local LLM took about 15 minutes. After eight loops, the system reached the score threshold. The improvement was clear even without comparing the scores: responses became concise rather than rambling, the tone stayed consistently professional, and the assistant usually acknowledged when the database did not contain an answer. It occasionally hallucinated even after admitting that it could not find supporting information, but because the final implementation would use a hosted AI service, this model-level issue could not be fully mitigated. I handed the code to the developers, who integrated it into the broader system with relatively minor changes.
17.3
Avg. score
pre-optimization
“Great question about scheduling a vacation. Vacations are really important for work-life balance and mental health. There are many ways you could approach this depending on your situation. Generally speaking, you would want to talk to your manager or HR department about taking time off. You might need to fill out some kind of form or submit a request through a system. It's usually a good idea to plan ahead and give your team enough notice so they can cover your responsibilities while you're away. Make sure to check how many vacation days you have available. Some companies have blackout periods where you can't take vacation. I hope this helps! Let me know if you have any other questions about vacation planning or anything else I can assist with.”
37.8
Avg. score
post-optimization
“Submit a vacation request under Tasks > Requests, select your dates, and it will be sent to your manager for approval. Full walkthrough here: Submitting Time-Off Requests.”
06, How others implement AI chats
A closer look at other AI chats revealed how many ways there are to solve the same problem
I explored how products named and surfaced their assistants, how they preserved conversation history, and how they structured the chat interface. I found that:
- There are three main naming conventions
- {CompanyName} + “AI” (e.g. Slack AI, Meta AI, Notion AI)
- Role-based name (e.g. Coach, Copilot)
- Unique name (e.g. Rovo, Watson)
- Multiple conversations are used almost exclusively on dedicated AI-chat pages. Assistants integrated into existing systems usually provide one persistent conversation
- The side panel is the most common pattern, although modals and chat bubbles also appear
- Assistants are accessed through distinctive buttons, but products rarely pressure users to engage with them
07, Exploring options
I explored a variety of options for both accessing the chat and presenting the interface. I then created prototypes and designed a simple internal test to gather feedback from people who used the tool every day. Together, the test results and stakeholder input helped me determine the right direction. We chose a top-right access button and a side panel because it allowed users to continue interacting with the page without making the chat feel too constrained.
Option 1, floating chat bubble
01 / 03
08, Fine-tuning the chat
The side panel was the most popular approach. However, each version included something users liked. I combined the strongest elements from each one in the final polished design.
09, Outcome
We met every requirement and delivered a functional product
The AI chat was functional, polished, responsive, and visually consistent with the platform. It was integrated into a dedicated test branch and passed every test.
The chat is accessible from every part of the platform, including while users view documents in a modal. The client considered it essential that the AI could assist workers wherever they were in the platform and whatever they were working on.
The chat shows when the AI is thinking and can craft responses using pictures or documents attached by users.
Users can also customize their model when enabled by an administrator, manage previous conversations, and recover gracefully from every error state.
10, Unveiling the project
The chat exceeded expectations and impressed the audience
The project was kept under wraps internally and revealed at the company Christmas party. Management wanted to end the year with one final surprise. What began as a 10-minute presentation became a 40-minute discussion as the audience asked question after question.
During the presentation, we demonstrated the AI's ability to find relevant articles quickly, answer questions accurately, provide links, and respond in any language.