ASP.NET Core  

How to Build an Internal Knowledge Assistant Using Azure AI Search and Blazor

Introduction

Organizations generate vast amounts of internal knowledge every day through documentation, policies, technical guides, support articles, meeting notes, and operational procedures. Unfortunately, employees often spend significant time searching for information across multiple systems, resulting in reduced productivity and duplicated efforts.

An Internal Knowledge Assistant addresses this challenge by allowing employees to ask questions in natural language and receive accurate answers based on company documentation. Instead of manually browsing documents, users can interact with an AI-powered assistant that retrieves relevant information and generates contextual responses.

By combining Azure AI Search, Azure OpenAI, and Blazor, .NET developers can build intelligent knowledge assistants that improve information accessibility while maintaining enterprise security and governance.

In this article, we'll explore the architecture, implementation approach, and best practices for building an internal knowledge assistant using Azure AI Search and Blazor.

Understanding the Solution Architecture

An internal knowledge assistant typically follows a Retrieval-Augmented Generation (RAG) architecture.

The workflow looks like this:

User Question
      ↓
Blazor UI
      ↓
Azure OpenAI Embedding Model
      ↓
Azure AI Search
      ↓
Relevant Documents Retrieved
      ↓
Azure OpenAI Chat Model
      ↓
Generated Response
      ↓
User Interface

This architecture ensures that AI responses are grounded in organizational knowledge rather than relying solely on model training data.

Key Components

The solution consists of several core services.

Blazor Frontend

Blazor provides the user interface where employees can:

  • Ask questions

  • View AI-generated responses

  • Browse referenced documents

  • Continue conversations

Azure AI Search

Azure AI Search serves as the retrieval layer.

It stores:

  • Indexed documents

  • Metadata

  • Vector embeddings

The service identifies the most relevant content for each query.

Azure OpenAI

Azure OpenAI performs two important tasks:

  1. Generating embeddings for document indexing

  2. Producing conversational responses

Enterprise Knowledge Sources

Common sources include:

  • SharePoint documents

  • PDF manuals

  • Knowledge base articles

  • Internal wiki pages

  • Technical documentation

  • HR policies

Preparing Documents for Indexing

Before documents can be searched, they must be processed and indexed.

Example document:

VPN Access Guide

Step 1:
Install the VPN client.

Step 2:
Authenticate using corporate credentials.

Step 3:
Connect to the approved gateway.

Rather than indexing the entire document as one large record, it should be divided into meaningful chunks.

Example:

Chunk 1:
VPN Installation

Chunk 2:
Authentication Process

Chunk 3:
Connection Procedure

This improves retrieval precision and response quality.

Creating Embeddings in .NET

Each document chunk is converted into a vector embedding before being stored in Azure AI Search.

Example:

using Azure.AI.OpenAI;

var client = new OpenAIClient(
    new Uri(endpoint),
    new AzureKeyCredential(apiKey));

var embeddingResponse =
    await client.GetEmbeddingsAsync(
        deploymentName: "text-embedding-model",
        input: documentChunk);

var embedding =
    embeddingResponse.Value.Data[0].Embedding;

The generated vector is stored alongside the document content.

Designing the Search Index

A typical Azure AI Search index may contain:

{
  "id": "123",
  "title": "VPN Access Guide",
  "content": "Install the VPN client...",
  "category": "IT Support",
  "contentVector": []
}

Important fields include:

  • Document title

  • Content

  • Category

  • Tags

  • Department

  • Embedding vector

Metadata enables filtering and improved search experiences.

Building the Blazor User Interface

A simple Blazor page can collect user questions.

@page "/assistant"

<h3>Knowledge Assistant</h3>

<input @bind="Question" />

<button @onclick="AskQuestion">
    Ask
</button>

<p>@Response</p>

Code-behind:

private string Question = string.Empty;
private string Response = string.Empty;

private async Task AskQuestion()
{
    Response =
        await KnowledgeService
            .GetAnswerAsync(Question);
}

This creates a basic conversational interface.

Retrieving Relevant Documents

When a user submits a question, Azure AI Search retrieves relevant document chunks.

Example query:

How do I reset my VPN credentials?

Search results might include:

Document:
VPN Access Guide

Section:
Credential Management

Only the most relevant content is passed to the language model.

This retrieval step is critical for minimizing hallucinations.

Generating AI Responses

After retrieving relevant content, the application builds a prompt.

Example:

Use the following company documentation
to answer the question.

Documentation:
[Retrieved Content]

Question:
How do I reset my VPN credentials?

The prompt is sent to Azure OpenAI.

Example .NET code:

var completion =
    await chatClient.CompleteChatAsync(
        messages);

var answer =
    completion.Value.Content[0].Text;

The generated response is then displayed within the Blazor application.

Practical Example

Imagine an employee asks:

What is the process for requesting software access?

The assistant performs the following steps:

  1. Generates an embedding for the question.

  2. Searches the knowledge base.

  3. Retrieves software access policy documents.

  4. Sends retrieved content to Azure OpenAI.

  5. Generates a concise answer.

Example response:

To request software access, submit a request
through the IT Service Portal. Approval from
your manager is required before access is
granted.

The response is grounded in company documentation rather than model assumptions.

Enhancing User Experience

Modern knowledge assistants can provide additional capabilities.

Source Citations

Display document references:

Source:
IT Access Policy
Section 4.2

Users gain confidence in AI-generated answers.

Suggested Questions

Examples:

How do I request VPN access?
Where can I find security policies?
How do I reset my password?

Conversation History

Maintain previous questions to support follow-up interactions.

Department Filters

Allow users to search specific knowledge domains:

  • HR

  • Finance

  • IT

  • Operations

  • Legal

Security Considerations

Enterprise knowledge assistants must prioritize security.

Implement Role-Based Access Control

Users should only access authorized information.

Example:

[Authorize(Roles = "ITSupport")]
public class SupportController
{
}

Protect Sensitive Data

Avoid exposing:

  • Customer information

  • Financial records

  • Credentials

  • Confidential business data

Log Search Activity

Track:

  • User queries

  • Retrieved documents

  • Generated responses

Audit logging supports compliance and troubleshooting.

Best Practices

When building internal knowledge assistants, consider these recommendations.

Use Hybrid Search

Combine:

  • Keyword search

  • Vector search

  • Semantic ranking

This improves retrieval quality.

Chunk Documents Carefully

Avoid overly large chunks that contain unrelated information.

Include Metadata

Metadata improves filtering and retrieval precision.

Refresh Indexes Regularly

Keep content synchronized with source systems.

Monitor User Feedback

Measure:

  • Retrieval accuracy

  • User satisfaction

  • Response quality

Continuous improvement leads to better adoption.

Common Challenges

Teams frequently encounter the following issues:

  • Poor document quality

  • Outdated knowledge sources

  • Incorrect chunking strategies

  • Missing metadata

  • Insufficient access controls

  • Retrieval performance problems

Addressing these challenges early improves overall system effectiveness.

Conclusion

Internal knowledge assistants are one of the most valuable enterprise AI applications because they help employees access information quickly and efficiently. By combining Azure AI Search, Azure OpenAI, and Blazor, .NET developers can build intelligent systems that transform organizational knowledge into a conversational experience.

A successful implementation depends on more than just AI models. High-quality document preparation, effective retrieval strategies, robust security controls, and thoughtful user experience design all play essential roles in delivering accurate and trustworthy answers.

As organizations continue investing in AI-driven productivity tools, internal knowledge assistants will become a foundational component of modern digital workplaces, enabling employees to find information faster and make better decisions with confidence.