Extending Large Language Models with Vision and Web Search: Visual Bridging and Web Search Plugins in Practice
This article explains why text-only large language models struggle with images and real-time information, and how plugin mechanisms such as visual bridging and web search fill these gaps. It covers the core technical workflows, a code example for a vision plugin, and how multi-plugin architectures can be deployed with cloud-native infrastructure.
Large language models (LLMs) have shown strong potential across many business scenarios thanks to their natural language understanding and generation. However, models built on a pure text architecture have two inherent limitations. First, they cannot directly parse non-text information such as images. Second, their knowledge is fixed at the cutoff date of their training data, so they cannot access real-time external information. To address these limits, the industry widely uses plugin mechanisms. External tools such as visual bridging and web search give base models multimodal capability and access to up-to-date information.
1. Capability Limits of Text-Only LLMs and the Plugin Extension Mechanism
The core of an LLM is the Transformer architecture and its self-attention mechanism. The input must be a sequence of discrete tokens. This structure means the model cannot process the pixel matrix of an image, and it cannot send requests to external networks on its own. When a task involves chart analysis, UI interaction judgment, or the latest industry news, a text-only model often hallucinates or states that it cannot help.
Plugin extension mechanisms address this gap. They do not change the network structure of the model itself. Instead, they attach external tools to the model so it can call external APIs. When a task falls outside the model’s capabilities, the model can use Function Calling or similar mechanisms to output a structured tool call instruction. An external system executes the instruction and feeds the result back to the model as text. This separates the “model brain” from the “external senses” while keeping them working together.
2. Visual Bridging: Giving LLMs the Ability to “See”
The core goal of a vision plugin is to close the semantic gap between images and text. It typically relies on multimodal alignment techniques or visual encoders. Adding a vision plugin to a text-only model involves the following technical paths:
- Image feature extraction and text mapping: The vision plugin first uses a pretrained vision model, such as a variant of the CLIP architecture, to extract features from the input image. A cross-modal alignment layer then maps the high-dimensional visual features into description vectors in the text space, or generates a natural language description directly.
- OCR and structured parsing: For images with a lot of text, such as scanned documents or complex charts, the vision plugin runs an OCR engine to extract the text. It then applies layout analysis to convert the image content into structured Markdown or JSON text, which is passed to the LLM.
Example architecture:
When a user uploads a line chart of business data and asks, “Analyze the reasons for the Q3 performance inflection point in the chart,” the system does the following:
- The vision plugin receives the image and extracts the axes, legend, and data points.
- It converts the image information into a text summary: “The chart shows that revenue was flat from Q1 to Q2, then rose sharply in Q3, with a growth rate of 45%…”
- The LLM uses this summary and the user’s earlier questions to produce an in-depth business analysis.
# Pseudocode: call logic for the visual bridging plugindef visual_bridge_plugin(image_url, user_query):# 1. Call the vision model to extract image descriptions and OCR textimage_description = vision_model.extract_text_and_objects(image_url)# 2. Insert the visual information into the prompt contextaugmented_prompt = f"User question: {user_query}\nExtracted image information: {image_description}\nAnswer based on the information above:"# 3. Call the LLM to generate the final responseresponse = llm.generate(augmented_prompt)return response
3. Web Search: Closing the Loop on Real-Time Information
Outdated knowledge and the lack of external information are the main reasons web search plugins are needed. A robust web search plugin does more than search for keywords and return results. It needs a rigorous retrieval-augmented generation (RAG) workflow:
- Intent recognition and query rewriting: The LLM first analyzes the user’s question and decides whether a web search is needed. If it is, the LLM rewrites the conversational question into a short keyword combination better suited to a search engine.
- Retrieval and crawling: The plugin calls a general-purpose search engine API to get a list of relevant web links. For the top-ranked links, it fetches the HTML source of each page.
- Content cleaning and chunking: The plugin strips HTML tags, extracts the main text, and splits long page content into chunks of reasonable size.
- Relevance ranking and context injection: Vector retrieval or keyword reranking selects the Top-K text chunks most relevant to the user’s question. These chunks are added to the final prompt as context, and the model is asked to summarize based on this real-time material.
This mechanism substantially reduces the hallucination rate in factual question answering. It allows a text-only model to act like an assistant with web access, so it can answer time-sensitive questions such as “What are the latest policies in a certain industry today?”
4. Multi-Plugin Coordination and Production Deployment
In real enterprise applications, a single plugin cannot meet complex requirements. Vision and search plugins often need to work together, which requires plugin routing and orchestration architecture. Developers can use the Function Calling capability of the LLM to let the model decide when to call the vision plugin, when to call the search plugin, or when to chain them together.
In production, this multi-plugin architecture places demands on the elasticity and concurrency of the underlying infrastructure. Enterprises usually deploy such architectures on mature cloud-native platforms. For example, with the cloud-native computing platform and API gateway service of Baidu AI Cloud, developers can package plugins such as visual feature extraction and web crawling as serverless functions. This decouples each plugin as a microservice. It also allows the system to scale elastically in milliseconds based on the concurrency of tool calls initiated by the LLM. Combined with the logging, monitoring, and alerting services the cloud platform provides, teams can track the latency and success rate of each plugin call and keep the overall AI application stable.
5. Summary
Text-only LLMs have natural strengths in text understanding and logical reasoning, but their weaknesses in multimodal perception and real-time information access are significant. By adding a visual bridging plugin and a web search plugin, developers can add these capabilities at relatively low cost and build agents that can describe images and search the web. As the plugin ecosystem and cloud-native engineering practices mature, the capability limits of LLMs will continue to expand. This points toward LLMs evolving from single-purpose text generation tools into general-purpose intelligent infrastructure.
