Saturday, April 25, 2026

How LLM Agents Work: System Prompt, Vector Database & Function Calling Explained

How LLM Agents Work: System Prompt, Vector Database & Function Calling Explained 

Artificial Intelligence has evolved rapidly with the rise of Large Language Models (LLMs). But modern AI systems are no longer just chatbots—they are AI agents capable of reasoning, retrieving knowledge, and performing actions. 

In this guide, we will break down how an LLM-powered agent architecture works using a simple and practical explanation.   Generated Diagram

1. What is an LLM Agent?

An LLM agent is a system that combines a language model with tools, memory, and reasoning capabilities to complete tasks.

Instead of just answering questions, an agent can:
  • Understand user intent
  • Fetch data from external sources
  • Execute actions (APIs, functions)
  • Return structured outcomes

2. Core Components of LLM Agent Architecture

System Prompt

The system prompt defines the behavior of the AI. It acts like instructions telling the model how to respond.

User Input or Task

This is the actual request from the user, such as:

  • Summarize this document
  • Fetch my billing data
  • Analyze this dataset

Reasoning Engine

The agent uses internal reasoning to understand what needs to be done before taking action.

Actions (Function Calling)

When external data or operations are needed, the agent performs function calling.

Example actions:
  • Call an API
  • Query a database
  • Trigger backend workflows

Knowledge Base (Vector Retriever)

This is where Retrieval-Augmented Generation (RAG) comes into play.

Data from sources like:

  • AWS S3
  • Google Drive
  • Internal documents

is converted into vector embeddings and stored in a vector database.

3. What is a Vector Database?

A vector database stores data in numerical form (embeddings) so the AI can quickly find relevant information.

Benefits:
  • Fast semantic search
  • Context-aware retrieval
  • Improved AI accuracy

4. External Tools Integration

Agents can connect to external tools such as:

  • Cloud storage (AWS S3)
  • File systems
  • APIs and microservices

This makes them powerful for real-world applications like automation and enterprise workflows.

5. Final Outcome

After reasoning, retrieving data, and executing actions, the agent produces the final output.

This output is:
  • Accurate
  • Context-aware
  • Action-driven

6. Real-World Use Cases

  • AI-powered customer support
  • Automated DevOps workflows
  • Document intelligence systems
  • Enterprise chatbots with data access

Conclusion

LLM agents are the future of intelligent automation. By combining reasoning, vector search, and tool execution, they go far beyond traditional AI systems.

If you are building AI applications, understanding this architecture is essential for creating scalable and powerful solutions.

Sunday, March 22, 2026

Git Fork vs Git Branch Explained for Beginners and Developers

If you are learning Git or working in a development team, you will often hear the terms fork and branch. Understanding the difference between them is essential for efficient collaboration and version control.

In this guide, we will explain Git fork vs Git branch in a simple and practical way with examples and use cases.

What is a Git Branch?

A Git branch is a separate line of development within the same repository. It allows developers to work on features, bug fixes, or experiments without affecting the main codebase.

Git Branch Example

git checkout -b feature/login

This command creates a new branch called feature/login and switches to it.

Git Branch Workflow

  1. Create a branch
  2. Make code changes
  3. Commit changes
  4. Merge changes into main branch
git checkout main
git merge feature/login

When to Use Git Branch

  • Feature development
  • Bug fixing
  • Code experimentation
  • Team collaboration within the same repository

What is a Git Fork?

A Git fork is a copy of an existing repository into your own GitHub account. It allows you to modify the code without affecting the original project.

Git Fork Example

After forking a repository, you clone it locally:

git clone https://github.com/your-username/project.git

Git Fork Workflow

  1. Fork the repository from GitHub
  2. Clone the forked repository
  3. Create a branch
  4. Make changes
  5. Push changes to your fork
  6. Create a Pull Request to the original repository

When to Use Git Fork

  • Contributing to open source projects
  • Working without direct repository access
  • Maintaining your own version of a project

Difference Between Git Fork and Git Branch

Feature Git Branch Git Fork
Definition Separate line of development Copy of a repository
Location Inside same repository Different repository (your account)
Access Required Yes No
Usage Internal team work External contributions
Collaboration Direct merge Pull request required

Real World Examples

Using Git Branch in a Team

Developers create branches for features and merge them into the main branch.

main -> feature/payment -> merge

Using Git Fork for Open Source

Developers fork a repository, make changes, and submit a pull request.

original repo -> fork -> branch -> pull request

Best Practices for Git Workflow

  • Always create a new branch for each feature or fix
  • Use clear and meaningful branch names
  • Keep your fork updated with the original repository
  • Follow a consistent Git workflow
git remote add upstream https://github.com/original/repo.git
git fetch upstream
git merge upstream/main

Conclusion

Understanding the difference between Git fork and Git branch is important for modern software development.

Use branches for daily development within your team and forks when contributing to external repositories.

This approach helps maintain clean code, better collaboration, and efficient version control.

Tuesday, December 02, 2025

Where Does Notepad++ Save Unsaved Files? Ultimate Guide to Recovering Lost Notes (2025)

Notepad++ is one of the most popular text editors for programmers, writers, and anyone who needs a fast, lightweight tool. But even with a reliable editor, unexpected crashes, power outages, or accidental window closures can create stressful moments—especially when you realize you never saved your work.

If you've ever wondered, "Where does Notepad++ store unsaved files, and can I recover them?" this guide walks you through all the locations that Notepad++ uses for backups, temporary files, and crash-recovery data.

Why Notepad++ Can Recover Unsaved Files

Notepad++ includes a feature called Session Snapshot & Periodic Backup. When it is enabled, Notepad++ automatically stores temporary versions of unsaved files in the background. This allows you to recover files even if you never manually saved them.

These temporary backups are stored in specific folders on your Windows system, and knowing where to look is the key to getting your work back.

1. The Main Notepad++ Backup Folder

The primary location for auto-saved or unsaved Notepad++ files is:

C:\Users\\AppData\Roaming\Notepad++\backup

You can quickly access it by pasting this into your File Explorer address bar:

%AppData%\Notepad++\backup

Inside this folder, you may find:

  • Files named after your original documents
  • Files titled “new 1”, “new 2”, etc. (for completely unsaved tabs)
  • Files with timestamps in their names

These files can usually be opened directly in Notepad++ just like any normal text file.

2. Crash-Recovery Folder for Unexpected Shutdowns

If Notepad++ or Windows crashed before it could save backups, there is another location worth checking:

C:\Users\\AppData\Local\Temp\N++RECOV\

This folder may contain:

  • Crash-dump versions of open documents
  • Temporary recovery files saved moments before the failure
  • Fragments of text that Notepad++ attempted to preserve

These files may not have a typical .txt extension. If they don’t open immediately, try renaming them to .txt or opening them through Notepad++ manually.

3. What Types of Files You Might Recover

Depending on the situation, these folders may contain:

  • Auto-saved backup files (normal text format)
  • Timestamped versions of your documents
  • Dump files from crashed sessions
  • Restored tabs from session history

Even if the files look unfamiliar, it’s always worth opening them—you might find exactly what you need.

4. When Recovery May Not Be Possible

Unfortunately, recovery isn’t guaranteed. You may not find your unsaved data if:

  • Session Snapshot & Periodic Backup was disabled
  • You clicked “Don’t Save” before exiting
  • The system crashed before Notepad++ had time to write backup files
  • The temporary files were cleared by the OS or cleanup tools

In those cases, Notepad++ simply never had a chance to preserve the data.

5. How to Prevent Losing Work in the Future

To minimize the risk of losing unsaved work again, enable and fine-tune your backup settings:

  1. Open Settings in Notepad++
  2. Go to Preferences
  3. Select Backup
  4. Make sure Enable session snapshot and periodic backup is checked
  5. Set a short backup interval (5–10 seconds works well)

This ensures that Notepad++ keeps creating silent background copies of your work.

Conclusion

Recovering unsaved Notepad++ files is usually possible, thanks to its automatic backup system. By checking these two folders:

  • %AppData%\Notepad++\backup
  • %LocalAppData%\Temp\N++RECOV\

you give yourself the best chance of restoring lost text—whether it was a quick note or an important project.

Take a moment to enable automatic backups in Notepad++ so you’re always protected, no matter what happens.

Friday, August 22, 2025

How to View the Console Window in Visual Studio 2022 (Beginner-Friendly Guide)

A compact guide explaining how to open the Console, Output, and Terminal windows — and how to keep the console from closing right away.

Viewing the Console Window When Running a Console App

When you build a Console Application (C#, C++, VB.NET, etc.), Visual Studio launches the console in a separate system window when you run your program.

  • Run normally: Press F5 or Debug → Start Debugging. The console window opens automatically.

Console Window Closing Immediately? Here’s Why

If the console appears only briefly, it’s because your program finished executing right away. Use one of these simple fixes to pause it:

Fix: Pause the Console

Add this line at the end of your Main method in C#:

Console.ReadLine();

Or use Start Without Debugging

Press Ctrl + F5 (Debug → Start Without Debugging). This runs your program and keeps the console open after execution finishes.

Visual Studio’s Built-In Windows You Should Know

Sometimes what you need is one of Visual Studio’s internal panels rather than the external console window. Two important ones:

The Output Window

Shows build messages, compiler warnings, debug messages, and other diagnostics.

Open it: Ctrl + Alt + O or View → Output.

Note: The Output window does not show Console.WriteLine() output unless you redirect output into it.

The Terminal Window

Use this for running scripts, PowerShell/Command Prompt, dotnet CLI commands, and Git operations.

Open it: Ctrl + ` (backtick) or View → Terminal. You can run your program manually here to view console output inside Visual Studio.

Quick Reference

Task Shortcut Menu Path Description
Run console app F5 Debug → Start Debugging Shows console in separate window
Run without debugging Ctrl + F5 Debug → Start Without Debugging Keeps console open
Open Output window Ctrl + Alt + O View → Output Build & debug logs
Open Terminal Ctrl + ` View → Terminal Integrated shell inside VS

Saturday, July 12, 2025

Crafting Effective Prompts: The Secret to Unlocking AI's Full Potential

As AI programmers, we're no strangers to the power of language models. But have you ever stopped to think about the role prompts play in shaping the output of these models? Prompt engineering is an emerging field that's revolutionizing the way we interact with AI systems. In this blog, we'll dive into the world of prompt engineering, exploring its importance, techniques, and best practices.

What is Prompt Engineering?

Prompt engineering is the process of designing and optimizing text prompts to elicit specific responses from language models. It's an art that requires a deep understanding of how AI models work, as well as the nuances of human language. By crafting effective prompts, developers can unlock the full potential of AI models, achieving more accurate and relevant results.

Why is Prompt Engineering Important?

  1. Improved Model Performance: Well-designed prompts can significantly improve the performance of language models, reducing errors and increasing accuracy.
  2. Increased Efficiency: By providing clear and concise prompts, developers can reduce the need for extensive fine-tuning and model adjustments.
  3. Enhanced User Experience: Effective prompts can lead to more natural and intuitive interactions with AI systems, improving the overall user experience.

Prompt Engineering Techniques

  1. Zero-Shot Prompting: Providing a prompt with no additional context or examples, relying on the model's pre-training data.
  2. Few-Shot Prompting: Providing a prompt with a few examples or context, allowing the model to learn and adapt.
  3. Chain-of-Thought Prompting: Breaking down complex tasks into a series of prompts, guiding the model through a step-by-step thought process.
  4. Adversarial Prompting: Designing prompts to test the model's limitations and vulnerabilities, identifying areas for improvement.

Best Practices for Prompt Engineering

  1. Keep it Simple: Use clear and concise language, avoiding ambiguity and complexity.
  2. Be Specific: Provide specific examples and context to guide the model's response.
  3. Test and Iterate: Continuously test and refine prompts to achieve optimal results.
  4. Understand Model Limitations: Recognize the strengths and weaknesses of the model, tailoring prompts to its capabilities.

Real-World Applications

  1. Chatbots and Virtual Assistants: Effective prompts can improve the accuracy and relevance of chatbot responses, enhancing user experience.
  2. Language Translation: Well-designed prompts can help language models capture nuances and context, improving translation accuracy.
  3. Text Summarization: Prompts can guide models to focus on key points and main ideas, generating more effective summaries.

Conclusion

Prompt engineering is a powerful tool in the AI programmer's toolkit. By mastering the art of crafting effective prompts, developers can unlock the full potential of language models, achieving more accurate and relevant results. Whether you're building chatbots, language translation systems, or text summarization tools, prompt engineering is an essential skill to have in your arsenal. I will be sharing  more insights and best practices on prompt engineering and AI development!