Home » world » Build AI Search with Supabase & Next.js

Build AI Search with Supabase & Next.js

by

Severe Storm Ziros Impacts Berlin: Multiple Fatalities and Widespread Disruption

Berlin, Germany – July 7, 2025 – A powerful storm, designated Ziros, swept across Berlin yesterday evening, leaving a trail of destruction and tragically resulting in at least two confirmed fatalities. Emergency services were stretched to their limits responding to numerous incidents throughout the capital.The storm caused meaningful damage to infrastructure and severely disrupted public transportation networks.

Initial Impact and Emergency Response

The storm’s intensity prompted a massive response from the Berlin Fire Department, who deployed resources across the city to address a surge in emergency calls. Reports indicate widespread damage to buildings, downed trees obstructing roadways, and flooding in low-lying areas. The full extent of the damage is still being assessed, but initial estimates suggest considerable costs for repairs and recovery.

Public transportation faced major setbacks. Train lines experienced delays and cancellations due to fallen debris and power outages. Bus routes were also affected, leading to significant commuter disruptions.Authorities urged residents to avoid needless travel and exercise extreme caution if venturing outdoors.

Understanding the Storm’s Severity

Storm Ziros arrived with unexpectedly high wind gusts, exceeding forecasts. According to meteorological data from the German Weather Service (DWD), sustained winds reached speeds of up to 100 kilometers per hour (62 mph) in some areas, with peak gusts even higher. Impact Area reported Damage Response Status Residential Areas Fallen trees, roof damage, localized flooding Damage assessment ongoing; repair crews deployed Public Transportation Train delays/cancellations, bus route disruptions Limited service resuming; full restoration expected within 24-48 hours Infrastructure Power outages, downed power lines Power restoration prioritized; estimated completion time varies by location

Did You Know? Berlin, despite its inland location, is susceptible to severe storms due to its relatively flat terrain and position within a major weather corridor.

Long-Term Recovery and Preparedness

The aftermath of Storm Ziros highlights the importance of urban resilience and preparedness for extreme weather events. City officials are now focusing on clearing debris, restoring essential services, and providing support to those affected by the storm.

Pro Tip: Before a storm, secure loose outdoor objects, trim trees near your home, and have an emergency kit readily available with essential supplies like water, food, and a flashlight.

Looking ahead, experts emphasize the need for continued investment in infrastructure improvements, enhanced early warning systems, and public awareness campaigns to mitigate the impact of future storms. Climate change is projected to increase the frequency and intensity of extreme weather events, making proactive preparedness even more critical.

What measures do you think Berlin can take to better protect its citizens from future storms? How vital is it for individuals to have a personal emergency preparedness plan?

The Increasing Frequency of Severe Storms in Europe

Europe has witnessed a notable increase in the frequency and intensity of severe storms in recent years. This trend is largely attributed to climate change, which is warming ocean temperatures and altering atmospheric patterns. Warmer air holds more moisture, leading to heavier rainfall and more intense storms. Furthermore, changes in the jet stream can cause weather systems to become

How to implement AI search using Supabase and next.js?

“`html

</p>

AI Search with Supabase & Next.js: A Developer’s Guide

AI Search with Supabase & Next.js: A Developer’s Guide

Leveraging Vector Embeddings for semantic Search

Modern search isn’t just about keyword matching; it’s about understanding the *meaning* behind queries.This is where semantic search, powered by vector embeddings, comes in. We’ll explore how to integrate this with Supabase, a powerful open-source alternative to Firebase, and next.js, a popular React framework for building performant web applications. This approach allows for more relevant and accurate search results, even when users don’t use the exact keywords present in your data.

Why Supabase for AI Search?

Supabase offers several advantages for building AI-powered search:

  • PostgreSQL Foundation: Supabase is built on PostgreSQL, a robust and reliable database.
  • pgvector Extension: crucially, Supabase supports the pgvector extension, which allows you to store and query vector embeddings directly within your database.
  • Realtime Capabilities: Supabase’s realtime features can be used to update search results dynamically.
  • Scalability: Supabase is designed to scale with your application.
  • Model Context Protocol (MCP): Supabase now supports MCP, enabling seamless integration with AI tools.

Setting Up Your Supabase Project

First, create a new Supabase project. Then, enable the pgvector extension. You can do this through the Supabase SQL editor:

CREATE EXTENSION vector;

Next, define a table to store your data and the corresponding vector embeddings. Hear’s an example:

Column Name data Type Description
id UUID Unique identifier for the data item
content TEXT The text content you want to search
embedding vector(768) The vector embedding of the content (adjust dimension based on your embedding model)

Generating Vector Embeddings

You’ll need to generate vector embeddings for your data. Popular options include:

  • OpenAI Embeddings API: A powerful and widely used option.Requires an OpenAI API key.
  • Sentence Transformers: Open-source models that can be run locally or deployed as a service.
  • Cohere Embeddings: Another commercial embedding service.

Here’s a simplified example using the OpenAI Embeddings API (using Node.js):


const { Configuration, OpenAIApi } = require("openai");

const configuration = new Configuration({

apiKey: process.env.OPENAI_API_KEY,

});

const openai = new OpenAIApi(configuration);

async function getEmbedding(text) {

const response = await openai.createEmbedding({

input: text,

model:

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.