<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community:  Ed Ian Jay Baguio</title>
    <description>The latest articles on DEV Community by  Ed Ian Jay Baguio (@baguio_edianjay).</description>
    <link>https://dev.to/baguio_edianjay</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2425265%2F0babbea7-5dc2-4c37-9107-303fe4428dc5.png</url>
      <title>DEV Community:  Ed Ian Jay Baguio</title>
      <link>https://dev.to/baguio_edianjay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/baguio_edianjay"/>
    <language>en</language>
    <item>
      <title>Leveraging a Vector Database for Semantic Search with ChromaDB: A Beginner’s Guide</title>
      <dc:creator> Ed Ian Jay Baguio</dc:creator>
      <pubDate>Sun, 22 Feb 2026 13:15:05 +0000</pubDate>
      <link>https://dev.to/up_min_sparcs/leveraging-a-vector-database-for-semantic-search-with-chromadb-a-beginners-guide-2mfd</link>
      <guid>https://dev.to/up_min_sparcs/leveraging-a-vector-database-for-semantic-search-with-chromadb-a-beginners-guide-2mfd</guid>
      <description>&lt;p&gt;&lt;em&gt;Sybil Micarandayo&lt;/em&gt; is a co-author of this article.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  🔎 Here’s our First QUERY = Search-Answers…
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
Imagine a situation where you ever searched for “Apple”, and the computer looked for the exact letters A-P-P-L-E. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;But what if you wanted information about “fruit” or “Steve Jobs"?&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;This is the failure of traditional keyword search. It requires a perfect 1-to-1 match of characters. &lt;/p&gt;

&lt;p&gt;Fortunately, &lt;strong&gt;modern AI solves this using a vector database to interpret context&lt;/strong&gt;, allowing the computer to understand that a search for Apple might actually be a quest for fruit or Steve Jobs based on the context of the data.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;What Makes A VECTOR DATABASE Different?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Vector Database is “Contextual”, they don’t look at words, they look at meaning. While traditional databases are “Literal”, they look for each character match. If two ideas are similar, they sit close together, regardless of the words used to describe them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If two ideas are similar, they are placed close together in vector space&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It represents data as mathematical points in space, like a vector model or 3D graph that captures semantic meaning. These points are stored as Vector Embeddings, a long list of numbers that represent coordinates. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx47a7g51qej6p1ubacf1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx47a7g51qej6p1ubacf1.jpg" alt="The diagram shows how ChromaDB converts unstructured document data into high-dimensional vector embeddings and stores them with metadata in a vector database, enabling efficient indexing and scalable similarity-based retrieval.&amp;lt;br&amp;gt;
" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Vector Embedding model&lt;/strong&gt; acts as a translator: &lt;/p&gt;

&lt;p&gt;It analyzes the human meaning of a query and matches it against a vast set of sources based on conceptual similarity rather than just text. &lt;/p&gt;

&lt;p&gt;However, these embeddings need a place to be stored and managed. This is where ChromaDB comes in.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Why Use ChromaDB?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ChromaDb  serves as a memory bank that stores and retrieves vector embeddings together with their associated metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ChromaDB&lt;/strong&gt; is a specialized database specifically designed for handling unique requirements of vector embeddings. Its production expanded rapidly in  2023 as an open-source, “AI-native” database which means built for AI applications rather than adding AI features to traditional databases. It offers optimized storage and lightning-fast querying by using vector indexing techniques such as approximate nearest neighbor search which quickly finds similar data points in large datasets. It is remarkably simple to set up and can run in your Python environment, ideally on version 3.12. &lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Now, let us try to build our own &lt;strong&gt;Semantic Search Engine&lt;/strong&gt;. But don’t worry, this demonstration is beginner-friendly. First, make sure to have the following before proceeding with our demonstration.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  ✅ PREREQUISITE:
&lt;/h2&gt;



&lt;ol&gt;
&lt;li&gt;Download Git bash&lt;/li&gt;
&lt;li&gt;Open Source code Editor (e.g. VS Code, Cursor, etc)&lt;/li&gt;
&lt;li&gt;Prepare a Python Environment/Extension&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  LET’S BUILD IT
&lt;/h2&gt;

&lt;p&gt;Now, let’s try to build our own semantic search engine through this entry-level demonstration script in VS Code!&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;A. Open your VS Code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure that the Python extension is installed&lt;/li&gt;
&lt;li&gt;Create a folder “Semantic Search”

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;B. Install the Dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On you terminal (Git Bash), run:
&lt;code&gt;pip install chromadb sentence-transformers&lt;/code&gt;
This code installs:&lt;/li&gt;
&lt;li&gt;ChromaDB - a vector database&lt;/li&gt;
&lt;li&gt;Sentence Transformers - an embedding model for converting text into vectors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This library is the translator that turns human language into a format that computers can understand.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: the first run may download the embedding model&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;C. Click the Command Palette (or Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for Python Create Environment &lt;/li&gt;
&lt;li&gt;Then, click “venv”: to create virtual environment (&lt;em&gt;This ensures your project has its own isolated dependencies.&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;Select Python Interpreter version 3.12&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;strong&gt;D. Create a file in python&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;semantic_search.py&lt;/code&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;E. Import required library&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import shutil

import chromadb
from chromadb.utils import embedding_functions
from chromadb.errors import InternalError
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This library starts with ChromaDB (vector database) locally on your computer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think of it as opening a mini database memory where your AI data will be stored.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;strong&gt;F. Set up the vector database (Persistent)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DB_PATH = "./chroma_semantic_search_db"

def _create_client_and_collection(path, collection_name):
   client = chromadb.PersistentClient(path=path)

   # Sentence Transformers
   embedding_function = embedding_functions.SentenceTransformerEmbeddingFunction(
       model_name="all-MiniLM-L6-v2"
   )

   # get_or_create_collection: reuse existing DB if it exists
   collection = client.get_or_create_collection(
       name=collection_name,
       embedding_function=embedding_function,
   )
   return client, collection
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This loads a pre-trained embedding model that understands human meaning.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This model converts sentences into vectors so the computer can understand meaning, not just words.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Persistent&lt;/strong&gt; means the vector database is saved to disk, not just kept in RAM. ChromaDB can run in-memory or persist to disk. For a “real” app, we use persistence.&lt;/p&gt;

&lt;p&gt;With chromadb.PersistentClient(path="./chroma_semantic_search_db"):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;vectors + documents are written into files under chroma_semantic_search_db (e.g. chroma.sqlite3)&lt;/li&gt;
&lt;li&gt;If you stop the script and run it again later, the data is still there and can be queried&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sentence Transformers: local model, no API key needed. Good for beginners.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;G. Error-handling Around Chroma Client (IMPORTANT!)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def get_or_create_collection(path=DB_PATH, collection_name="documents"):
   """
   Create a ChromaDB client and get (or create) a collection with embeddings.
   The embedding function converts text into vectors that capture meaning.

   If the underlying SQLite database is corrupted (e.g. "database disk image is malformed"),
   automatically reset the on-disk Chroma DB and recreate it.
   """
   try:
       return _create_client_and_collection(path, collection_name)
   except InternalError as e:
       # Handle corrupted SQLite DB by clearing and recreating the Chroma directory.
       if "database disk image is malformed" not in str(e):
           raise

       print(
           f"Detected corrupted ChromaDB database at '{path}' "
           "(database disk image is malformed). Resetting the database directory..."
       )

       # Remove the existing persistent directory and recreate it fresh.
       if os.path.exists(path):
           shutil.rmtree(path)

       return _create_client_and_collection(path, collection_name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is important for safe initialization and automatic DB reset&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Upon the initial execution following a corruption event, the system is expected to print a message indicating the detection of a corrupted database and the initiation of a reset. It should then proceed with normal operation. Subsequent executions should begin cleanly with a new vector database; consequently, you might need to re-add or re-seed any necessary data.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;H. Create a Collection&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INITIAL_DOCS = [
   "Amazon Web Services is a cloud computing platform.",
   "Python is used in machine learning.",
   "Artificial Intelligence enables automation.",
]


def seed_documents(collection, initial_docs=None):
   """Add initial documents if the collection is empty. Returns count added."""
   if initial_docs is None:
       initial_docs = INITIAL_DOCS
   existing = collection.count()
   if existing &amp;gt; 0:
       return 0  
   for i, doc in enumerate(initial_docs):
       collection.add(documents=[doc], ids=[f"doc_{i}"])
   return len(initial_docs)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Every text you store here will be automatically converted into vectors using the embedding model.

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;I. Add a Document&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; add_document(collection, document, doc_id, stored_docs_set):
   """
   Add one document to the collection. ChromaDB will compute its embedding
   automatically using the collection's embedding_function.
   """
   key = document.strip().lower()
   if not key:
       return False, "Cannot add an empty sentence."
   if key in stored_docs_set:
       return False, "Duplicate sentence; not added."
   collection.add(documents=[document.strip()], ids=[doc_id])
   stored_docs_set.add(key)
   return True, "Sentence added successfully."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;When you add a document to ChromaDB, the system processes your text with the embedding model and then stores the resulting vector. That’s why later you can search “by meaning”: everything in the DB is already stored as vectors.

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;J. Semantic Search (TOP-K)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def search_documents(collection, query, n_results=3):
   """
   Query by meaning: the query is embedded and compared to all document
   vectors. Returns the top-n_results closest matches and their distances.
   Lower distance = more similar.
   """
   query = query.strip()
   if not query:
       return None, "Please enter a non-empty search query."

   results = collection.query(
       query_texts=[query],
       n_results=min(n_results, collection.count() or 1),
       include=["documents", "distances"],
   )

   docs = results["documents"][0]
   dists = results["distances"][0]
   if not docs:
       return [], "No documents in the database yet. Add some with the 'add' command."

   return list(zip(docs, dists)), None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;This section provides an answer to a user's question based on meaning, rather than on the exact phrasing. It utilizes the same embedding model used for adding documents: the user query is converted into a vector, which is then compared against the vectors of all stored documents. The top-k results are the k documents with vectors closest to the query vector (in this case, k = 3).

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;K. Main Application Loop&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def main():
   print("Initializing Semantic Search (Vector DB with ChromaDB)...\n")

   client, collection = get_or_create_collection()
   stored_docs = set()
   # Rebuild in-memory duplicate set from existing collection (optional; for demo we track new adds)
   try:
       all_data = collection.get(include=["documents"])
       for doc_list in (all_data.get("documents") or []):
           for d in doc_list or []:
               if d:
                   stored_docs.add(d.lower())
   except Exception:
       pass

   added = seed_documents(collection)
   if added:
       for d in INITIAL_DOCS:
           stored_docs.add(d.lower())
       print(f"Seeded {added} sample documents.\n")

   # Next ID for newly added documents
   id_counter = collection.count()

   print("========================================")
   print(" SEMANTIC SEARCH (ChromaDB Demo)")
   print("========================================")
   print("Commands:")
   print("  add    -&amp;gt; Add a sentence to the vector database")
   print("  search -&amp;gt; Search by meaning (top results + scores)")
   print("  exit   -&amp;gt; Quit\n")

   while True:
       command = input("Enter command (add / search / exit): ").strip().lower()

       if command == "add":
           new_doc = input("Enter a sentence to store: ")
           success, msg = add_document(
               collection, new_doc, f"doc_{id_counter}", stored_docs
           )
           if success:
               id_counter += 1
           print(msg + "\n")

       elif command == "search":
           query = input("Enter your search query: ")
           results, err = search_documents(collection, query, n_results=3)
           if err:
               print(err + "\n")
               continue
           print("\nTop matching results (lower distance = more similar):")
           for rank, (doc, dist) in enumerate(results, 1):
               print(f"  {rank}. [distance: {dist:.4f}] {doc}")
           print("-----------------------------\n")

       elif command == "exit":
           print("\nExiting. Your vector database is saved at:", DB_PATH)
           break

       else:
           print("Unknown command. Use: add, search, or exit.\n")


if __name__ == "__main__":
   main()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The core of the application is a small Command Line Interface (CLI) loop that orchestrates all functions. This loop initializes the application, loads an existing data collection or creates a new one, and can optionally pre-populate it with data (seed). It then enters a continuous cycle, prompting the user to select and execute one of the available commands: add, search, or exit.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Application Flow:&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;a. Startup:&lt;/strong&gt; Create a persistent client and collection (get_or_create_collection). Rebuild the in-memory set for duplicate checks. Seed sample documents if the collection is empty (seed_documents). Set the id_counter. Print the menu (add/search/exit).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b. Loop (while True):&lt;/strong&gt; Read a command.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;add: Prompt for a sentence, call add_document(), and update id_counter.&lt;/li&gt;
&lt;li&gt;search: Prompt for a query, call search_documents(..., n_results=3), and print the top matching results (rank, distance, text).&lt;/li&gt;
&lt;li&gt;exit: Print the database save location and break.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;c. After exit:&lt;/strong&gt; Data is persisted in chroma_semantic_search_db due to using PersistentClient.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Summary&lt;/strong&gt;: The main application loop repeatedly takes a command to add a document, search with top-k semantic search, or exit, with all data persistently stored on disk.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  TEST IT YOURSELF!
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
🧪 Now that your semantic search program is ready, let’s test it properly by entering meaningful search queries and verifying the results.&lt;/p&gt;

&lt;p&gt;You can do a search query, add documents or knowledge  or exit the program.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;A. Run the program&lt;/strong&gt;&lt;br&gt;
In your terminal, run and execute your Python file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python semantic_search.py&lt;/code&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;B. Test Semantic Search Queries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Try the following queries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter command (add / search / exit): search
Enter your search query: cloud services platform

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter command (add / search / exit): search
Enter your search query: language used for AI models
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;C. Add your Own Document&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can add more sentences to test better.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter command (add / search / exit): add

Enter a sentence to store: AWSCC is a community where you can gain hands-on cloud skills, access AWS esources, work on real projects,and get support for certification.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now try searching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter command (add / search / exit): search
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter your search query: What is AWSCC?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And find out what's the result.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚠️LIMITATION
&lt;/h2&gt;

&lt;p&gt;However, there are also cons with using vector databases. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It does not automatically remove duplicates.&lt;/li&gt;
&lt;li&gt;Stores every embedding independently.&lt;/li&gt;
&lt;li&gt;Identical or very similar sentences may be taken in repeated results. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Semantic Retrieval Systems, this is called &lt;em&gt;Redundant Semantic Retrieval&lt;/em&gt;.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
And please understand that this is &lt;strong&gt;not a Question-Answering (QA) system&lt;/strong&gt;. This does not mean that a semantic search engine can generate direct answers to user queries. Instead, it just provides back documents that are semantically similar with our query based on vector similarity.&lt;/p&gt;

&lt;p&gt;In our demo we added a simple duplicate check so the same sentence isn’t stored twice; ChromaDB itself does not do this for you.&lt;/p&gt;

&lt;p&gt;If we want to generate an answer or build context-aware or natural language responses, we need to combine this with a Large Language Model (LLM) within a Retrieval-Augmented Generation (RAG) pipeline.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What we built is a retrieval system, and not a generation system.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is what our system is actually implying:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18p6mbdwqm56veffxypr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18p6mbdwqm56veffxypr.png" alt="The semantic search pipeline, where a user query is transformed into an embedding, processed through similarity search within a vector database, and used to retrieve the most contextually relevant document" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🤔 Oooops, you might be thinking now that this could be useless. &lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Nuh - - uh, Not at all.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
Even though this is not a QA System, semantic search alone can be used in many aspects, especially here in our university to elevate the services we can offer.&lt;/p&gt;

&lt;p&gt;It can be used for:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. University Knowledge Base Search&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2. Freshie Guide Primer&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;3. UPMin Enrollment FAQ Retrieval System&lt;/strong&gt;&lt;br&gt;
And even&lt;br&gt;
&lt;strong&gt;4. Document Search for our Organization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In fact, before chatbots could generate answers, they also need to retrieve information. Our system can also become a backend retrieval system for them.&lt;/p&gt;

&lt;p&gt;This may look underwhelming, but this system can be actually very helpful, even for students and school organizations. It’s &lt;strong&gt;practical, applicable, and very relevant&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;We believe that’s all of it for now, and we hope to share with you more articles soon, maybe about LLM already so we could do the QA or even &lt;strong&gt;ELEVATE our game even higher!&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📴Here’s our final QUERY = EXIT.
&lt;/h2&gt;

</description>
      <category>sparcs</category>
      <category>vectordatabase</category>
      <category>chromadb</category>
    </item>
    <item>
      <title>Static Website Deployment on AWS Amplify via GitHub (Entry-Level Guide)</title>
      <dc:creator> Ed Ian Jay Baguio</dc:creator>
      <pubDate>Tue, 11 Nov 2025 18:10:34 +0000</pubDate>
      <link>https://dev.to/baguio_edianjay/static-website-deployment-on-aws-amplify-via-github-entry-level-guide-3ngj</link>
      <guid>https://dev.to/baguio_edianjay/static-website-deployment-on-aws-amplify-via-github-entry-level-guide-3ngj</guid>
      <description>&lt;p&gt;There are many ways to deploy a website using different technology, but doing it with AWS services takes your skills and game to the next level. One a beginner developer can gauge their learnings on is using AWS Amplify and GitHub for deploying a Static Website.&lt;/p&gt;

&lt;p&gt;Unlocking something that helps in your entry-level projects—whether it’s a small website or a useful tool—is not just beginner’s luck; it’s &lt;strong&gt;progress&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For starters, it's important to first understand the tools needed to successfully follow the steps and instructions. &lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequesites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An AWS Account and Basic Understanding of AWS IAM&lt;/li&gt;
&lt;li&gt;GitHub Account&lt;/li&gt;
&lt;li&gt;Basic Understanding of Web Technologies&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create a new React App (or directly deploy through GitHub Page)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On your local host:&lt;/p&gt;

&lt;p&gt;a. run using npm run dev (for actual React App)&lt;/p&gt;

&lt;p&gt;b. run using npx serve (for static website, e.g. personal portfolio using the template) or simply use local hosting instead of React App&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Initialize GitHub Repository&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy with AWS Amplify&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clean up resources&lt;br&gt;
(For reference: &lt;a href="https://docs.aws.amazon.com/hands-on/latest/host-static-website/host-static-website.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/hands-on/latest/host-static-website/host-static-website.html&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create a React App&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;On a new bash terminal, input the following to create a React App framework:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm create vite@latest staticwebsite -- --template react
cd static website
npm install
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;But since we will only be deploying a static website (personal portfolio), instead of npm run dev, run:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;npx serve&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or simply use Open Live Server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;View App
&lt;u&gt;For react app:&lt;/u&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;For static website alone:&lt;/u&gt;&lt;br&gt;
Serving!                                &lt;/p&gt;

&lt;p&gt;│   - Local:    &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; │&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Make sure all the files are under the root directory and not inside the App if using purely Static Website.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  If using [REACT APP Framework]
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Sign in to GitHub and Create a GitHub Repository:&lt;/strong&gt;&lt;br&gt;
If you have no account yet, please sign-up first: &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;https://github.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p0kbos69mfu0vjhdk2g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p0kbos69mfu0vjhdk2g.png" alt=" " width="782" height="815"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;2. Search Through your AWS Console and Create IAM Account *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; You can always use your root account for deployment, but it could pose possible major security risk. It's a common practice to many AWS Services Users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Search AWS Amplify to your console&lt;/strong&gt;&lt;br&gt;
a. Start with Deploy an App&lt;br&gt;
b. Select GitHub and Click Next.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6vbc9atvhenbeha63a5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6vbc9atvhenbeha63a5.png" alt=" " width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;c. Select Repository Branch&lt;br&gt;
i. Authenticate first with GitHub.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzjc20kxg60ydky3lw95v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzjc20kxg60ydky3lw95v.png" alt=" " width="800" height="771"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ii. Update GitHub Permission, and Select Repository and Branch&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft97fg9zvpepygcqz7ovr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft97fg9zvpepygcqz7ovr.png" alt=" " width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;d. Review Build Settings&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F43sp4dlikoudv389zb3u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F43sp4dlikoudv389zb3u.png" alt=" " width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  If not using [REACT APP Framework]
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;just follow the same steps but run npx serve first for the static website or simply use Open Live Server&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;d.a Review Build Settings&lt;br&gt;
Since, we are building a purely Static Website, make sure that the main html file, and assets and components folders are in the root directory. Check the YML File if it is stating a command: "npm run dev" (no command should state running an app). Leave Frontend Build Command blank and the Build Output Directory with only a dot (.).&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02cjpza3t3mrihn1gc6v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02cjpza3t3mrihn1gc6v.png" alt=" " width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;e. Deploy the App (or the Static Website)&lt;br&gt;
To deploy your web app or static website to a global content delivery network (CDN), review first the inputs selected, and choose Save and deploy. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F80q8cja91bejjxpbdwly.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F80q8cja91bejjxpbdwly.png" alt=" " width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;f. View the Deployed App&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ekv1ir42ng158orv9z1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ekv1ir42ng158orv9z1.png" alt=" " width="800" height="329"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Note: Incorrect Build Settings will result to the failure of your deployed URL. You may visit this Documentation for more in-depth guide on AWS Hosting especially with using different frameworks: &lt;a href="https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And that's it! You just deployed your own website. But before we celebrate. it's also important to know how to clean up our resources (especially if you are using databases for your application).&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;4. Clean up your Resources *&lt;/em&gt;&lt;br&gt;
Scan to your left nav bar, and look for App Settings. In the General Settings, you can select delete app and confirm by typing "delete".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AND VOILA! You just figured out how to elevate your game as a developer.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Profile
&lt;/h2&gt;

&lt;p&gt;My portfolio website is live! While it’s a work in progress, this project demonstrates website deployment using AWS Amplify and GitHub Repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://main.d4ve3q82vkf9m.amplifyapp.com/" rel="noopener noreferrer"&gt;https://main.d4ve3q82vkf9m.amplifyapp.com/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff43bat5jmzmfgpxuthtz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff43bat5jmzmfgpxuthtz.png" alt=" " width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you were able to follow the steps and created your own portfolio as well! Launch that now '-'&lt;/p&gt;

</description>
      <category>aws</category>
      <category>awsamplify</category>
      <category>github</category>
    </item>
  </channel>
</rss>
