AskNu: RAG-Based Employee Knowledge Management System

nubank · Finance · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Employee knowledge management

Nubank needed employees to find accurate internal documentation quickly across autonomous Confluence spaces without forcing every question into a support ticket.

Constraints:

Architecture

AskNu is a Slack-integrated RAG system over Nubank’s Confluence documentation. An automated indexing job extracts text from every department page, chunks documents with metadata, embeds them, and refreshes the knowledge base every two hours. At query time, AskNu performs a first search to support dynamic few-shot department classification, then performs a second search only inside the classified department and feeds those chunks to an LLM to generate a personalized answer with document URLs. If the answer is not satisfactory, the user is routed to the relevant department portal to open a ticket.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  employee-slack-client["employee-slack-client"] --> asknu-rag-service["asknu-rag-service"]
  confluence-documentation["confluence-documentation"] --> confluence-indexer["confluence-indexer"]
  confluence-indexer["confluence-indexer"] --> embedding-model["embedding-model"]
  embedding-model["embedding-model"] --> knowledge-base["knowledge-base"]
  asknu-rag-service["asknu-rag-service"] --> first-pass-retriever["first-pass-retriever"]
  first-pass-retriever["first-pass-retriever"] --> knowledge-base["knowledge-base"]
  first-pass-retriever["first-pass-retriever"] --> dynamic-few-shot-classifier["dynamic-few-shot-classifier"]
  dynamic-few-shot-classifier["dynamic-few-shot-classifier"] --> department-scoped-retriever["department-scoped-retriever"]
  department-scoped-retriever["department-scoped-retriever"] --> knowledge-base["knowledge-base"]
  department-scoped-retriever["department-scoped-retriever"] --> answer-generation-llm["answer-generation-llm"]
  answer-generation-llm["answer-generation-llm"] --> asknu-rag-service["asknu-rag-service"]
  asknu-rag-service["asknu-rag-service"] --> department-ticket-portal["department-ticket-portal"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
employee-slack-client Slack interface where employees submit natural-language questions. asknu-rag-service
asknu-rag-service Application layer that orchestrates query routing, retrieval, answer generation, citations, and ticket fallback. employee-slack-client, first-pass-retriever, dynamic-few-shot-classifier, department-scoped-retriever, answer-generation-llm, department-ticket-portal
confluence-documentation Department-owned pages and internal documentation used as the knowledge source. confluence-indexer
confluence-indexer Automated job that extracts text from department pages, chunks documents, and preserves metadata. confluence-documentation, embedding-model, knowledge-base
embedding-model Converts documentation chunks into semantic vectors. confluence-indexer, knowledge-base
knowledge-base Vector and metadata store containing Confluence chunks by id, title, URL, and department. first-pass-retriever, department-scoped-retriever, embedding-model
first-pass-retriever Retrieves candidate chunks and department examples for dynamic few-shot classification. asknu-rag-service, knowledge-base, dynamic-few-shot-classifier
dynamic-few-shot-classifier LLM-powered router that assigns the query to a department or External Source using retrieved examples. first-pass-retriever, department-scoped-retriever
department-scoped-retriever Second-stage retriever that searches only the classified department’s documents. dynamic-few-shot-classifier, knowledge-base, answer-generation-llm
answer-generation-llm Generates a personalized answer from the user question and department-scoped retrieved chunks. department-scoped-retriever, asknu-rag-service
department-ticket-portal Fallback destination for unsatisfactory answers or cases needing department support. asknu-rag-service

Data flow

Confluence department pages are periodically extracted, chunked, embedded, and stored with document metadata. A Slack user asks AskNu a question. The first retrieval pass supplies candidate chunks and departments to a dynamic few-shot classifier that chooses a department or External Source. AskNu then searches only the selected department’s documents, sends the retrieved chunks and user query to the LLM, returns a personalized answer with URLs, and redirects dissatisfied users to the appropriate ticket portal.

“The solution is integrated on Slack, so that employees can make your queries easily.”article, stated
“Each document is divided into chunks, retaining metadata such as its id, title, url and department.”article, stated
  1. For the routing: the retrieved chunks are fed into a LLM to perform a Few-Shot classification, in a process we call Dynamic Few-Shot Classification."
“References for the URLs of the retrieved documents fed to the LLM are also provided to the user”article, stated

Why this architecture

Nubank chose RAG because internal documentation changes too often for repeated fine-tuning to be economical. The two-stage retrieval design prevents the answer model from mixing documents across departments, while Slack integration and URL references keep the tool inside employee workflows and auditable. The two-hour refresh cadence keeps team-owned documentation current without removing autonomy from the teams that own it.

4 supporting quotes
“new relevant information can be created at any time, and fine-tuning a LLM each time would be way too costly.”article, stated
“To avoid the answers being generated based on documentations of different departments”article, stated
“As the departments update their documentation frequently, this process is automatically triggered every 2 hours, to guarantee employees would always get updated information.”article, stated
“If they are not happy with the answer, they are redirected to the portal of the department to raise a ticket”article, stated

Models used: Large Language Model · embeddings · dynamic few-shot classification · RAG

Scale

Alternatives considered (roads not taken)

Fine-tune the LLM whenever documentation changes

Rejected because: New information appears constantly, making repeated fine-tuning too costly.

“fine-tuning a LLM each time would be way too costly. The RAG framework addresses this issue as it provides an AI architecture that allows the search for information on a knowledge base – Nubank’s Confluence documentations, in our use case – to retrieve relevant information given the user query in re”article, stated

Search the whole documentation corpus for final answer generation

Rejected because: Whole-corpus retrieval risked mixing department documentation and producing inaccurate or confusing answers.

“the LLM mixing up documentations from different domains leading to inaccurate/confusing answers.”article, stated

Force every failed answer into manual search

Rejected because: AskNu keeps a structured fallback to the department portal so support tickets are still routed correctly.

“If they are not happy with the answer, they are redirected to the portal of the department to raise a ticket on that matter.”article, stated

Patterns

rag-retrieval (retrieval)

AskNu retrieves current Confluence chunks in real time and feeds them to an LLM for answer generation.

“The retrieved documentation feeds a Large Language Model (LLM) to generate a personalized answer”article, stated

model-routing (orchestration)

A dynamic few-shot classifier routes each question to the right department or External Source before answer retrieval.

“the solution determines which department holds the relevant information to provide the answer.”article, stated

retrieval-ranking (retrieval)

The first retrieval step supplies the few-shot examples and department candidates used for classification.

“The examples fed to the LLM are determined by the retrieved chunks of the first search step.”article, stated

human-in-the-loop-gate (fallback)

Unsatisfied users are redirected to the relevant department support portal.

“the user may be directed to the appropriate portal, so they can raise a ticket on that matter.”article, stated

data-quality-loop (governance)

Department owners audit answers and use answer quality to find documentation improvement opportunities.

“department owners regularly audit the answers to find opportunities of improvement in the documentations.”article, stated

Tradeoffs

Use RAG instead of repeated fine-tuning

Chose real-time retrieval from Confluence over fine-tuning whenever documentation changes.

Rationale: RAG gives fresher answers at lower operational cost for dynamic internal documentation.

“The RAG framework addresses this issue as it provides an AI architecture that allows the search for information on a knowledge base”article, stated

Use two-stage retrieval

Chose department classification followed by scoped search over single-stage whole-corpus answer retrieval.

Rationale: The first stage reduces cross-domain confusion; the second stage generates the answer from a narrower and more relevant document set.

“Once the domain is identified, a new search is triggered. In this step only the documents of the identified department are queried.”article, stated

Gotchas (what bit them)

RAG over all Confluence spaces can mix unrelated departmental policies.

Root cause: Autonomous teams own separate documentation domains with overlapping language.

Resolution: Use a first-pass department classifier, then retrieve only from that department for final answer generation.

“Each team at Nubank has its own processes and documentation on Confluence”article, stated
“only the documents from the classified department are queried”article, stated

Documentation freshness makes fine-tuning an operational mismatch.

Root cause: Relevant internal information can be created at any time.

Resolution: Refresh the RAG knowledge base every two hours instead of repeatedly fine-tuning the model.

“new relevant information can be created at any time”article, stated
“to guarantee employees would always get updated information.”article, stated

Evaluation

AskNu measures user feedback, response rate, answer accuracy through department-owner audits, answer latency, and ticket-reduction outcomes after general availability.

Metrics: 80% positive feedback · 6% response rate · 74% internal-domain answer accuracy · 9 seconds to answer · 30 minutes Confluence search baseline · 8 hours ticket baseline · support-ticket reduction

3 supporting quotes
“80% of positive feedback on the answers (6% of response rate)”article, stated
“74% of internal domain requests answers have been labeled as accurate.”article, stated
“the department owners regularly audit the answers”article, stated

Outcomes

The source reports a 9,000-employee organization, two-hour knowledge-base refresh, 5,000 active users, 280,000 messages, and answer retrieval time reduced to 9 seconds.

3 supporting quotes
“6 months after the tool has been generally available for all employees”article, stated
“9 seconds to get an answer on AskNu”article, stated
“In the next post, we are going to bring the efforts that have already been made regarding the content governance”article, stated