Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sicherheitslücken (CVE)USN-8797-1: GStreamer Base Plugins vulnerability(21.09.2026 um 20:05 Uhr)
Sichere ProgrammierungYou can build HTML emails with Tailwind CSS(21.09.2026 um 22:15 Uhr)
Sichere ProgrammierungDEV-Part-1-Backend.md(21.09.2026 um 22:24 Uhr)
Sichere ProgrammierungWhat It Actually Costs to Serve a 1M-Token Model in Production(21.09.2026 um 22:33 Uhr)
Sichere ProgrammierungHow to Check an Agent's Diagnosis Before It Touches Production(21.09.2026 um 22:53 Uhr)
Linux Tipps & HardeningWhat if Spotify was self-hosted? I think I got pretty close.(21.09.2026 um 22:33 Uhr)
Linux Tipps & HardeningSandboxing on Linux(21.09.2026 um 22:45 Uhr)
Sicherheitslücken (CVE)USN-8797-1: GStreamer Base Plugins vulnerability(21.09.2026 um 20:05 Uhr)
Sichere ProgrammierungYou can build HTML emails with Tailwind CSS(21.09.2026 um 22:15 Uhr)
Sichere ProgrammierungDEV-Part-1-Backend.md(21.09.2026 um 22:24 Uhr)
Sichere ProgrammierungWhat It Actually Costs to Serve a 1M-Token Model in Production(21.09.2026 um 22:33 Uhr)
Sichere ProgrammierungHow to Check an Agent's Diagnosis Before It Touches Production(21.09.2026 um 22:53 Uhr)
Linux Tipps & HardeningWhat if Spotify was self-hosted? I think I got pretty close.(21.09.2026 um 22:33 Uhr)
Linux Tipps & HardeningSandboxing on Linux(21.09.2026 um 22:45 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Information Extraction with Google Gemini

Introduction In this blog post, you will be presented with the mechanism on how to perform the information extraction with ease using the large language models like Google Gemini Pro. The LLMs are the hottest topic of the year 2022/23.…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Introduction



In this blog post, you will be presented with the mechanism on how to perform the information extraction with ease using the large language models like Google Gemini Pro.



The LLMs are the hottest topic of the year 2022/23. Since then there has been a great demand and a ton of innovation and applications are being build by directly utilizing the LLMs or in combination with vector databases etc. However, in this blog post, you will be presented with the information extraction aspects only.






Background



Information Extraction has been an ever challenging one in the history of mankind. Considering the complexities of data extraction, especially when dealing with the unstructured to structured data previously involved a ton of complexities. However, these days, things have changed or evolved with the introduction of large language models.






Hands-on




  1. Please head over to the Google Colab

  2. Make sure to login to the Google Cloud and get the Project Id and Location Info.

  3. Use the below code for Vertex AI initialization purposes.




import sys

# Additional authentication is required for Google Colab
if "google.colab" in sys.modules:
# Authenticate user to Google Cloud
from google.colab import auth

auth.authenticate_user()

PROJECT_ID = "<<project_id>>" # @param {type:"string"}
LOCATION = "<<location>>" # @param {type:"string"}

if "google.colab" in sys.modules:
# Define project information
PROJECT_ID = PROJECT_ID
LOCATION = LOCATION

# Initialize Vertex AI
import vertexai
vertexai.init(project=PROJECT_ID, location=LOCATION)






For the purpose of this post, let's consider a scenario of web data extraction.



Here's the code snippet for performing the textual data extraction. Our goal is to extract the meaningful information from the specified content consists of a ton of information includes links, images and HTML tags for example. It could be anything for that matter.




def get_text_extract_prompt(title, content):
prompt = f"""
Here is its title: {title}
Here is some text extracted:
---------
{content}
---------

Web pages can have a lot of useless junk in them.
For example, there might be a lot of ads, or a
lot of navigation links, or a lot of text that
is not relevant to the topic of the page. We want
to extract only the useful information from the text.

You can use the url and title to help you understand
the context of the text.
Please extract only the useful information from the text.
Try not to rewrite the text, but instead extract
only the useful information from the text.
"""
return prompt






Now let's take a look into the code snippet which is responsible for executing the prompt using the Google Gemini Pro LLM. Here's the code snippet.




import vertexai
from vertexai.preview.generative_models import GenerativeModel, Part

def execute_prompt(prompt, max_output_tokens=8192):
model = GenerativeModel("gemini-pro")
responses = model.generate_content(
prompt,
generation_config={
"max_output_tokens": max_output_tokens,
"temperature": 0,
"top_p": 1
},
stream=True,
)

final_response = []

for response in responses:
final_response.append(response.candidates[0].content.parts[0].text)

return ".".join(final_response)






Let's take a look into the code snippet for performing the above-mentioned calls. Here's the code snippet. Notice below, the text extracts prompt is constructed based on the specific title and the content, further the execute prompt is being called for performing the information extraction using the Gemini Pro LLM.




text_extract_prompt = get_text_extract_prompt(title, content)
prompt_response = execute_prompt(text_extract_prompt)
information_extraction.append(prompt_response)


Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Information Extraction with Google Gemini

Thematisch verwandte Begriffe: Information, Extraction, with, Google · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-45381 | Tautulli is a Python based monitoring and tracking tool for Plex Media S…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick