Tag: Generative-AI

Generative AI is a topic the MagnusMinds engineering team writes about from project work: how it is set up, where it breaks, and what we changed in production. This tag page lists all 3 articles tagged Generative AI.

Start with “Building a RAG-Powered Enterprise Knowledge Assistant with ASP.NET Core, Gemini, and PostgreSQL”, “We Built Agents using Microsoft Frameworks That Actually Run in Production”, or “5 Amazing Things You Can Do with Google AI Mode in 2025”. Open a post for the full write-up, or follow another tag or category on the card to a related topic.

Building a RAG-Powered Enterprise Knowledge Assistant with ASP.NET Core, Gemini, and PostgreSQL
Oct 27, 2026 8 min read

documents flow into a semantic retrieval layer that supplies context to a generative model, backed by an ASP.NET Core API and PostgreSQL with pgvector. Why RAG matters for enterprise knowledge Most organizations already hold the answers to their employees’ questions. They sit in policy documents, wikis, handbooks and runbooks. The hard part is putting the right paragraph in front of the person asking, in the words they used to ask. Three approaches handle this differently: Keyword search matches terms. It works when the user knows the document’s vocabulary, and struggles when they ask about “probation” and the policy says “trial period”. A plain generative API call sends the question straight to a model. The answer reads fluently, but the model only knows its training data and the prompt. It has never seen your leave policy, so it will decline or guess. Retrieval-Augmented Generation (RAG) retrieves relevant passages first and gives them to the model together with the question. The original RAG paper describes combining a model’s parametric memory with a non-parametric memory: a dense vector index reached through a retriever. RAG adds a retrieval step between the question and the model. It can improve access to relevant information; it does not guarantee accuracy. Not every application needs RAG. If answers don’t depend on private or changing documents, a direct model call is simpler. RAG earns its place when answers must come from a specific body of documents. The proof of concept To understand the pipeline end to end, I built a small proof of concept called the Enterprise AI Knowledge Assistant. It uses ASP.NET Core for the API, Google’s Gemini API for embeddings and answer generation, and PostgreSQL with the pgvector extension, hosted on Supabase, as the vector store. The knowledge base is deliberately tiny: a text file of five company-policy statements covering annual leave, remote work, password rotation, probation and deployment approval. That is enough to see every stage of RAG working on questions like “How many days of paid leave do employees get?”. It is a learning project, so this article makes no claims about real users, accuracy or performance. What it does show is the workflow, which is the same whether the knowledge base holds five sentences or five thousand pages. The RAG workflow at a glance Two workflows share one retrieval store. Every RAG system has two phases that meet in a vector store. Phase 1, knowledge preparation (done ahead of time). Read the documents, split them into chunks, turn each chunk into a vector with an embedding model, and store the text, vector and source name. Phase 2, question answering (done per question). Turn the question into a vector with the same model, find the stored chunks closest to it, place those chunks in a prompt, and ask the generative model to answer from them. The rest of this article follows those steps in order. Step 1: Chunking, deciding what the model gets to see Embedding a whole handbook as one vector would blur dozens of topics together, and long passages inflate prompt size and cost. Documents are split into chunks small enough to be about one thing and large enough to make sense alone. The usual choices: Fixed-size splitting is simple and predictable but can cut through sentences. Paragraph-based splitting follows the author’s structure but produces uneven sizes. Overlap repeats a little text across chunk boundaries so a fact that straddles two chunks survives intact in at least one. Metadata, such as the source filename, lets you trace a chunk back to its document. The proof of concept splits on paragraphs and groups whole paragraphs into a chunk until a character limit is reached, keeping each statement intact. The demo file becomes three chunks. Each chunk is stored with its source filename. For longer, messier documents, overlap and token-aware sizing are the natural refinements. Step 2: Embeddings, turning text into vectors An embedding model maps text to a list of numbers so that texts with similar meaning end up near each other. That is what lets “how long is probation?” find “new employees have a probation period of six months” without sharing many words. An embedding does not answer anything. It only helps find candidates, and the nearest vectors can still be irrelevant. The proof of concept calls Gemini’s gemini-embedding-001 model and requests 768-dimensional vectors. According to the Gemini embeddings documentation, this model outputs 3072 dimensions by default and supports smaller sizes such as 768, and the docs also describe retrieval task types (RETRIEVAL_DOCUMENT for stored text, RETRIEVAL_QUERY for questions) that suit RAG. The same page names a newer model, gemini-embedding-2, which is worth evaluating. One rule matters above the rest: documents and questions must be embedded with the same model and dimensionality. Vectors from different models are not comparable. Step 3: Storing and searching vectors in PostgreSQL PostgreSQL with pgvector keeps chunks, metadata and embeddings in one familiar database. Each row in a document_chunks table holds the chunk text, its source file, and its embedding in a vector(768) column. Retrieval is a nearest-neighbor query. In pgvector, <=> is cosine distance, and cosine similarity is 1 - distance according to the pgvector reference. The proof of concept orders chunks by cosine distance to the question vector and keeps the top K: .Select(x => new { x.Id, x.Content, x.SourceFile, Distance = x.Embedding.CosineDistance(queryVector) }) .OrderBy(x => x.Distance) .Take(topK) Choosing K is a trade-off. Too small and the answer may miss a relevant chunk; too large and the prompt fills with noise. The demo uses a small K, which suits its small knowledge base. Without an index, pgvector performs exact nearest-neighbor search by scanning the table, which gives perfect recall (same reference). That is ideal at demo scale. For large collections, Supabase’s vector index guide generally recommends HNSW, and EDB’s pgvector documentation describes it as faster with better recall than IVFFlat, at the cost of memory and build time. That is a decision to make when the data grows, not before. Step 4: Building the augmented prompt and generating the answer This is the step that makes the pipeline RAG. The retrieved chunks are formatted into labelled blocks and placed in the prompt ahead of the question: Context: [Source 1] File: mock.txt Employees are entitled to 12 days of annual paid leave every year. Question: How many days of paid leave do employees get? A system instruction tells Gemini to answer using only the Context, not to fill gaps from general knowledge, and to reply with a fixed “not found” sentence when the context lacks the answer. Compare this with the plain call, where only the question is sent and the model answers from its training data. With retrieval, the model can answer from content it never saw in training, such as a company’s own leave policy. Changing the knowledge means updating the stored chunks, not retraining a model. The API response also returns the retrieved passages with their source file, so a reader can see what the answer was based on. How far can you trust a RAG answer? RAG improves the odds of a relevant answer. It does not guarantee a correct one. Grounding by prompt is an instruction, not a guarantee. A model told to use only the context can still misread it or lean on memory. Retrieval quality sets the ceiling. Top-K returns the closest chunks even when none is truly relevant, which is why production systems often add a similarity threshold or a “no good match” path. Returned sources are not verified citations. They show which passages the model was given, not which passage supports which claim. Evaluating a RAG system means testing retrieval and generation separately: did the right chunk come back, and did the answer stay faithful to it? Taking RAG beyond a proof of concept A few concerns move to the front when real documents and real users arrive: Permission-aware retrieval. Access control has to be applied in the retrieval query, before private content reaches the model. OWASP’s Vector and Embedding Weaknesses entry warns about weak access controls and context leakage between groups in shared vector stores. Untrusted documents. Retrieved text is input, and a document can contain instructions. OWASP’s prompt injection guidance notes that RAG does not fully prevent prompt injection and suggests constraining model behavior and clearly separating untrusted content. More sources and formats. PDFs, Word files, wikis and uploads need text extraction and a way to update or remove documents. Measurement. A set of real questions with known answers, used to tune chunking and K. Where this could help When an organization’s answers live in documents, RAG may reduce the friction of finding them: people ask in their own words and get an answer tied to passages in specific files. Those are potential benefits, not measured results. Building this proof of concept showed me that the model call is the smallest part of the system. Useful AI applications depend on how knowledge is chunked and retrieved, who is allowed to see what, and how answers are checked. How could your team make organizational knowledge easier to reach without sacrificing security or reliability? References Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, arXiv:2005.11401. Google, Embeddings, Gemini API, Google AI for Developers. Supabase, Vector indexes, Supabase Docs. pgvector 0.8.2 reference, pgvector documentation (PDF), hosted by Crunchy Data. EnterpriseDB, Using pgvector, EDB Docs. OWASP, LLM08:2025 Vector and Embedding Weaknesses, OWASP Gen AI Security Project. OWASP, LLM01:2025 Prompt Injection, OWASP Gen AI Security Project.

We Built Agents using Microsoft Frameworks That Actually Run in Production
Dec 02, 2025 5 min read

AI has moved past the hype cycle and into a decisive phase. Enterprises are no longer impressed by demos or prototypes. They want solutions that can plug into real systems, support real workflows, and deliver real business outcomes. And this is exactly where the conversation around AI agents has taken a serious turn. Enterprises want AI that works inside real systems, not just in demos, and we have successfully built and deployed agents that operate in Microsoft Teams and Copilot at production scale. Enterprises today are shifting rapidly from AI experimentation to full-scale deployment. Executives are no longer asking, “Can we use AI?” They are asking, “How do we integrate AI into our existing workflows, systems, and teams in a reliable and secure way?” This is where many organizations hit a wall. Building an intelligent agent in a lab is one thing. Deploying it inside Microsoft Teams, Microsoft Copilot, or enterprise applications at scale is an entirely different challenge. And that is exactly the journey our team has been leading. Over the past year, we have moved from early-stage proof of concepts to delivering fully production-ready AI agents that operate inside real enterprise environments. We have built agents using Microsoft Semantic Kernel, Microsoft Agent Framework, LangChain, and other orchestration tools. Through this work, we have seen how these technologies bridge the gap between AI capabilities and real business needs. Semantic Kernel continues to be a critical part of our architecture, providing the orchestration foundation needed for maintainability, scalability, and extensibility. 1. Why Semantic Kernel Is the Backbone of Enterprise AI Agent Development Semantic Kernel enables AI systems to work with enterprise applications without disruption. For agent-based systems, this orchestration layer is essential. Through our implementation work, we have seen how Semantic Kernel supports: Smooth integration with legacy and modern platforms Centralized orchestration logic for multi-agent workflows Plugin-based extensibility that accelerates development Production-ready governance and maintainability This means AI agents do not sit on the side as isolated tools. They become operational digital co-workers embedded in real systems. 2. Our Journey From POCs to Production-Ready AI Agents Most companies stop at experimentation. We continued through to full deployment. Below is a summary of what we have built. A. AI Agents Using Semantic Kernel, Microsoft Agent Framework, and LangChain We have delivered multi-agent ecosystems using: Microsoft Semantic Kernel as the orchestration layer Microsoft Agent Framework for standardized agent structure LangChain for reasoning and tool coordination Azure OpenAI and other LLM services for generative intelligence These agents now support tasks such as: Multi-step planning Task decomposition Enterprise data retrieval Knowledge reasoning API-driven action execution B. Taking AI Agents From Pilot to Production Scaling prototypes into production required addressing challenges such as: Security and identity governance Observability and monitoring Performance optimization Reliability of multi-agent workflows Plugin maintainability Integration with enterprise APIs Human validation checkpoints Today, our agents are supporting real business operations, not just test environments. C. Agents Integrated Directly Into Microsoft Teams and Microsoft Copilot One of our major achievements is building fully operational agents inside Microsoft Teams and Copilot using pro-code solutions. These agents: Support employees directly inside their daily collaboration tools Trigger workflows and gather insights Retrieve knowledge from enterprise repositories Generate summaries, reports, and recommendations Execute system-level tasks through plugins and connectors This approach ensures high adoption because employees do not need to change the way they work. D. Using Semantic Kernel as the Orchestration Layer for Long-Term Scalability To ensure consistent architecture, we use Semantic Kernel as the foundation for: Memory management Skill and plugin organization Planning capabilities Reusable workflows Integration patterns Model-agnostic orchestration This is what allows our solutions to evolve without complete rewrites. 3. The Business Value We Are Delivering With Enterprise AI Agents Based on our production deployments, AI agents are driving value in areas such as: IT Operations Incident classification Automated diagnosis Recommendation and remediation assistance Knowledge Management Conversational search across documents and systems Automated summarization Fast retrieval of organizational knowledge Workflow Automation Streamlining approval processes Triggering ERP and CRM actions Coordinating tasks between departments Employee Productivity Drafting documentation and reports Generating meeting summaries Automating repetitive daily tasks inside Teams These are not theoretical examples. These are use cases we have taken from pilot to production. Actionable Insights: How Enterprises Can Start Their Own Agent Journey 1. Begin With a Focused Use Case Select a workflow that is high-effort and well understood. Examples include knowledge retrieval, IT incident classification, or automated document creation. 2. Invest Early in a Plugin Strategy Plugins become reusable skills for every agent your organization builds. This creates long-term scalability. 3. Standardize on Semantic Kernel for Orchestration This provides consistency across agents and reduces complexity as the ecosystem grows. 4. Work With a Partner Who Has Delivered Production-Ready Agents Enterprise-grade AI requires expertise in: Agent frameworks AI orchestration Microsoft ecosystem integration Security and governance Production deployment disciplines Our team brings this end-to-end capability, from design to deployment to continuous improvement. Conclusion AI agents are quickly becoming a core part of enterprise operations. But real value comes only when these agents move from experimentation into production environments. By leveraging Microsoft Semantic Kernel, Microsoft Agent Framework, and LangChain, we have successfully built and deployed AI agents inside Microsoft Teams and Microsoft Copilot using pro-code, enterprise-ready architectures. These systems are already powering real workflows and supporting real users. The organizations that act now will gain a significant advantage. We are excited to help shape this next chapter in enterprise AI adoption. 4. Call-to-Action If your organization is exploring AI agents or preparing to move from prototypes to production, we would be glad to collaborate. Connect with us for more insights on enterprise AI, agent orchestration, and Microsoft-based digital transformation.

5 Amazing Things You Can Do with Google AI Mode in 2025
Jul 21, 2025 4 min read

Artificial Intelligence is rapidly transforming how we work, communicate, and create. At the forefront of this revolution is Google AI Mode an advanced set of AI-powered features built directly into popular Google apps like Gmail, Docs, Sheets, and Slides. Whether you’re a student, marketer, business owner, or tech enthusiast, understanding what you can do with Google AI Mode right now can dramatically boost your productivity and creativity. In this article, we’ll cover the top 5 amazing things you can do with Google AI Mode in 2025, real-world use cases, and how to unlock its powerful capabilities. What is Google AI Mode? Google AI Mode is a suite of Generative AI features integrated across Google Workspace apps, powered by tools like Gemini AI, formerly known as Google Bard and Duet AI. It enables users to generate content, analyze data, automate repetitive tasks, and collaborate smarter all within their familiar Google environment. Top 5 Amazing Things You Can Do with Google AI Mode 1. Write Smarter in Gmail & Google Docs Whether you’re drafting an email, proposal, or blog post, Google AI Mode can generate high-quality text in seconds. What You Can Do: Auto-generate emails with context from previous threads Summarize long conversations into bullet points Create professional content in Google Docs instantly Use Case: Imagine replying to dozens of customer support emails. With Google AI-powered Smart Compose, you get auto-suggestions and email replies that sound human and precise. 2. Turn Raw Data into Insights with Google Sheets AI Google AI Mode now lets you analyze spreadsheets and visualize data with just a prompt. What You Can Do: Ask natural-language questions like “Show me sales growth by region” Generate pivot tables, charts, and trends automatically Forecast trends using built-in AI functions Use Case: Sales managers can upload CSV files and ask Google AI to summarize top-performing products no formulas or coding needed. 3. Automate Project Planning & Collaboration Using Google Slides and Calendar integrated with AI Mode, you can automate entire workflows. What You Can Do: Generate presentation slides from Docs or meeting notes Auto-schedule meetings based on participants’ availability Translate, proofread, and format documents on the fly Use Case: Marketing teams can feed a blog draft into Google AI, and it will generate a full presentation deck perfect for internal briefs or client updates. 4. Create Visual & Creative Content with Gemini AI In 2025, Google Gemini AI within Google AI Mode allows you to generate: Images Video drafts Brand visuals Even code snippets What You Can Do: Generate social media images based on a product description Build UI mockups with simple prompts Write HTML code or AppScript for automation Use Case: Designers and developers can now quickly prototype and visualize ideas without leaving their browser. 5. Search Smarter and Get Personalized Recommendations AI-enhanced Google Search, powered by Google AI Mode, brings hyper-personalized results and real-time answers. What You Can Do: Get direct answers in natural language Summarize long web pages or documents Discover smarter recommendations for files, links, and contacts Use Case: Instead of scanning pages for a recipe, Google AI Mode gives you the steps, ingredients, and a shopping list instantly. How to Enable Google AI Mode Here’s how to activate Google AI Mode in supported apps: Open Gmail, Docs, or Sheets Look for the ? Help Me Write or Ask Gemini button Click it to interact with the AI Choose from options like Create, Summarize, Fix grammar, or Translate Note: Some features are available only for Google Workspace or Gemini Advanced users. Benefits of Google AI Mode Boost productivity with instant automation Create content faster and better Make data-driven decisions easily Translate and localize global content Reduce manual and repetitive tasks FAQs About Google AI Mode What is Google AI Mode used for? Google AI Mode helps you create, summarize, automate, and analyze across Gmail, Docs, Sheets, Slides, and more. Is Google AI Mode free? Yes, basic AI features are free in Google Workspace. Advanced features may require a Gemini Advanced subscription. Does Google AI Mode work offline? No, most features require an internet connection for real-time AI processing. How is Google AI Mode different from ChatGPT? Google AI Mode is embedded into Google apps and is context-aware. ChatGPT is standalone and works via prompt-based interaction. Conclusion:  With the rise of generative AI, tools like Google AI Mode are no longer optional they’re essential for staying ahead. Whether you want to write faster, plan smarter, or automate tasks, Google AI Mode is your personal assistant inside your favorite apps. Start using Google AI Mode today and transform the way you work.