Understanding Vector Search and Distance Metrics in Vector Search

Retrieval Strategies Dense Retrieval Dense retrieval uses continuous, fixed-dimensional vectors (embeddings) to represent documents and queries. These dense vectors capture semantic meaning and contextual information. Key Features: Represents text as dense vectors (typically 768-4096 dimensions) Captures semantic relationships well Uses neural models like BERT, Sentence-BERT, or OpenAI鈥檚 text-embedding models Excels at understanding synonyms and related concepts Advantages: Strong semantic understanding Handles paraphrasing effectively Good at capturing document meaning Works well for concept-based queries Disadvantages: ...

February 10, 2024 路 6 min 路 Da Zhang

The Ultimate Coffee Breakdown: From Bean to Brew!

The Ultimate Coffee Breakdown: From Bean to Brew! Hey coffee nerds! 馃憢 Been deep in the coffee rabbit hole lately and wanted to share some basics for anyone looking to level up their coffee game. Arabica vs. Robusta: The Basics Feature Arabica Robusta Flavor Profile Sweeter, complex, nuanced Stronger, more bitter Caffeine Content Lower Almost double arabica Growing Conditions High altitude, specific climate Hardier, more adaptable Market Share ~60% of global production ~40% of global production Common Uses Specialty coffee, premium blends Instant coffee, espresso blends Coffee Origins & Processing Methods Popular Origins and Their Flavor Profiles: Ethiopia: Fruity, floral, wine-like, berries Colombia: Balanced, medium body, chocolate notes Guatemala: Chocolate, nuts, subtle fruitiness Brazil: Nutty, low acidity, caramel notes Indonesia: Earthy, spicy, full-bodied, herbal Processing Methods: Washed: Fruit removed before drying Clean, bright acidity, clear origin flavors Natural/Sun-dried: Dried with fruit intact Fuller body, fruit-forward, sweeter Honey/Pulped Natural: Partial fruit removal Balanced sweetness, complex body Roast Levels Breakdown Roast Level Flavor Characteristics Body Acidity Best For Light Bright, floral, fruity, grainy Light High Pour-over, highlighting origin flavors Medium Balanced, caramel, nuts, chocolate Medium Medium Versatile, drip coffee, pour-over Dark Bold, smoky, bittersweet, roasty Full Low Espresso, French press, milk drinks Top Specialty Beans for Pour-Over Ethiopia Yirgacheffe ...

December 4, 2023 路 2 min 路 Da Zhang

Andrew Ng: Opportunities in AI - 2023

Introduction This discussion took place on July 26, 2023, at Cemex Auditorium, Stanford University, and was hosted by the Stanford Graduate School of Business. This talk covers: Trends in AI Technologies and Tools Supervised Learning Generative AI The Adoption of AI Opportunities in AI Process for Building Startups AI Risks and Social Impact Youtube Video TL;DR The following content is generated by AI. ...

September 3, 2023 路 2 min 路 Da Zhang

Advanced Prompt Engineering: Unlocking the Full Potential of LLMs

Advanced Prompt Engineering: Unlocking the Full Potential of LLMs After spending countless hours working with large language models (LLMs), I鈥檝e discovered that the difference between mediocre and exceptional results often comes down to how you frame your requests. While basic prompting can get you decent outputs, advanced prompt engineering techniques can transform these AI systems into powerful collaborators that deliver precisely what you need. Beyond the Basics: Strategic Prompting Techniques Role and Context Framing One of the most powerful techniques is establishing a specific role and context for the LLM: ...

July 10, 2023 路 4 min 路 Da Zhang

Build Your Own Applications with the OpenAI API

OpenAI Python Library Install the OpenAI Library 1 2 # install from PyPI pip install --upgrade openai Import the relevant Python Libraries and Load the OpenAI API Key If you don鈥檛 have an API Key, Get your API Key here. 1 2 3 4 5 6 7 8 import openai import os from dotenv import load_dotenv, find_dotenv _ = load_dotenv(find_dotenv()) # read local .env file openai.api_key = os.getenv('OPENAI_API_KEY') # more secure Here, we use a .env file to store our OpenAI API Key. ...

July 3, 2023 路 4 min 路 Da Zhang