0Pricing
Vector Databases: Pinecone, Weaviate & pgvector · บทเรียน

เวกเตอร์ฝังตัวหลายรูปแบบข้อมูล

ค้นพบวิธีทำงานกับเวกเตอร์ฝังตัวที่สร้างจากข้อมูลหลายประเภท เช่น รูปภาพ เสียง และวิดีโอ เพื่อประสบการณ์การค้นหาที่หลากหลาย

เวกเตอร์ฝังตัวหลายรูปแบบข้อมูล เป็นบทเรียน Vector Databases: Pinecone, Weaviate & pgvector ฟรีบน CoddyKit นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Vector Databases: Pinecone, Weaviate & pgvector และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Vector Databases: Pinecone, Weaviate & pgvector มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Unlocking Multi-Modal Data

Welcome to Multi-Modal Embeddings! So far, we've mostly focused on text, but the real world is rich with different types of data.

Imagine searching for 'a happy dog' and getting not just text descriptions, but also images, videos, and even audio clips of dogs barking happily. That's the power of multi-modal embeddings!

Why Go Beyond Text?

While text embeddings are powerful, they only capture information from one 'sense'. Most real-world data isn't confined to a single format.

  • Richer Context: An image speaks a thousand words, an audio clip adds emotion.
  • Diverse Queries: Search an image with text, or find related text from a video.
  • Holistic Understanding: AI systems can 'understand' concepts more completely.

The Unified Vector Space

The core idea of multi-modal embeddings is to map different types of data (text, images, audio, video) into a single, shared vector space.

This means that a vector representing 'a happy dog' from an image will be numerically close to a vector representing 'a happy dog' from a text description or an audio recording of a happy dog.

Image Embeddings: Visual Search

Image embeddings convert the pixels of an image into a dense vector. Models are trained to understand visual concepts, objects, and scenes.

  • Visual Similarity: Find images that look alike.
  • Image-to-Text Search: Query with an image, find relevant text documents.
  • Content Moderation: Identify inappropriate visual content automatically.

Audio Embeddings: Sound Insights

Audio embeddings transform sound waves into vectors. These models capture characteristics like timbre, pitch, rhythm, and even semantic meaning from spoken words or environmental sounds.

  • Sound Event Detection: Identify specific sounds (e.g., barking, sirens).
  • Music Recommendation: Find songs with similar moods or genres.
  • Speech Recognition: Underlying technology for voice assistants.

Video Embeddings: Dynamic Content

Video embeddings are more complex, often combining visual (frames) and audio components, along with temporal information (how things change over time).

They allow for understanding actions, events, and overall video content. Think of it as a sequence of image and audio embeddings, processed to capture motion and narrative.

Generating Multi-Modal Vectors

Specialized neural networks, often called multi-modal models, are trained on vast datasets containing paired data (e.g., images with captions). Famous examples include OpenAI's CLIP or Google's PaLI.

These models learn to represent different modalities consistently in the same vector space. Here's a conceptual Python example:

import numpy as np

def generate_embedding(data, data_type):
    """
    Simulates generating an embedding for various data types.
    In a real system, this would call a multi-modal model API.
    """
    if data_type == "text":
        # Example: embedding for 'A red car'
        return [0.1, 0.2, 0.3, 0.4, 0.5]
    elif data_type == "image":
        # Example: embedding for an image of a red car
        return [0.12, 0.21, 0.33, 0.45, 0.52]
    elif data_type == "audio":
        # Example: embedding for engine sound of a car
        return [0.08, 0.19, 0.28, 0.41, 0.55]
    else:
        return []

if __name__ == "__main__":
    text_input = "A red sports car"
    image_input_mock = "<image_data_of_red_car>" 
    audio_input_mock = "<audio_data_of_car_engine>"

    text_vec = generate_embedding(text_input, "text")
    image_vec = generate_embedding(image_input_mock, "image")
    audio_vec = generate_embedding(audio_input_mock, "audio")

    print(f"Text embedding (concept): {np.round(text_vec, 2)}")
    print(f"Image embedding (concept): {np.round(image_vec, 2)}")
    print(f"Audio embedding (concept): {np.round(audio_vec, 2)}")

    # In a real multi-modal system, these vectors would be numerically 
    # close if they represent the same underlying concept.

Storing Multi-Modal Embeddings

Once generated, these multi-modal vectors are stored in vector databases, just like text embeddings.

It's crucial to also store metadata with each vector, indicating its original data type (e.g., 'type': 'image', 'type': 'text'). This metadata helps in filtering and understanding the search results.

Enabling Rich Search Experiences

The true power of multi-modal embeddings lies in enabling seamless, cross-modal search and retrieval:

  • Text-to-Image: Describe an image, get visual results.
  • Image-to-Text: Upload an image, find descriptive articles.
  • Audio-to-Video: Hum a tune, find videos featuring that music.
  • Video-to-Text: Get summaries or captions from video content.

This creates a much more intuitive and powerful search experience.

Multi-Modal Benefits Check

Which of the following are key benefits or characteristics of multi-modal embeddings?

Recap: Beyond Single Senses

Great job! In this lesson, we explored multi-modal embeddings, which extend the power of vector representations beyond single data types like text.

  • We learned how different modalities (images, audio, video) are mapped into a unified vector space.
  • This enables richer, cross-modal search experiences, allowing you to query with one data type and retrieve results from another.
  • Multi-modal models are key to building AI systems that understand the world more holistically.

This is a crucial step towards more human-like AI interactions!

คำถามที่พบบ่อย

บทเรียน “เวกเตอร์ฝังตัวหลายรูปแบบข้อมูล” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “เวกเตอร์ฝังตัวหลายรูปแบบข้อมูล” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Vector Databases: Pinecone, Weaviate & pgvector ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Vector Databases: Pinecone, Weaviate & pgvector มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “เวกเตอร์ฝังตัวหลายรูปแบบข้อมูล”

ค้นพบวิธีทำงานกับเวกเตอร์ฝังตัวที่สร้างจากข้อมูลหลายประเภท เช่น รูปภาพ เสียง และวิดีโอ เพื่อประสบการณ์การค้นหาที่หลากหลาย คุณปฏิบัติ Vector Databases: Pinecone, Weaviate & pgvector ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Vector Databases: Pinecone, Weaviate & pgvector หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Vector Databases: Pinecone, Weaviate & pgvector บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน

บทเรียน “เวกเตอร์ฝังตัวหลายรูปแบบข้อมูล” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Vector Databases: Pinecone, Weaviate & pgvector นี้ได้ไหม

ได้ บทเรียน Vector Databases: Pinecone, Weaviate & pgvector ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. การค้นหาแบบผสม: เวกเตอร์และคำสำคัญ
  2. เวกเตอร์ฝังตัวหลายรูปแบบข้อมูล
  3. เทคโนโลยีฐานข้อมูลเวกเตอร์ใหม่ ๆ
  4. การดึงข้อมูลและความจำสำหรับเอเจนต์
← กลับไปที่ Vector Databases: Pinecone, Weaviate & pgvector