跳到正文
DEV Community· Bhoomi Vaity·· 2 小時前AI 評分33

Quote Compare:比較供應商報價的本地驗證工具

Quote Compare: A Local Validator for Comparing Supplier Quotations

AI 導讀

三人團隊開發 QuoteCompare,這款本地 AI 工具可擷取供應商報價 PDF 資料、驗證財務數字並比較供應商。工具透過 Ollama 在本機執行開放權重模型 Gemma 3:4B,並由 Python 驗證總額及税項,按預設 70% 價格、30% 質素計算排名。報價 PDF 的核心 AI 處理可在用戶電腦本機完成,毋須付費雲端 AI API。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

Team

QuoteCompare was built by a team of three:

What I Built

Anyone can put quotes side by side. QuoteCompare reads the PDFs locally, validates every total and tax figure, and only then helps you choose.

QuoteCompare is a locally running AI-powered application that helps businesses compare supplier quotations and make more informed procurement decisions.

When organizing any event, businesses often receive quotations from multiple vendors in different PDF formats. Comparing prices, taxes, included services, and supplier quality manually can be time consuming and error prone.

QuoteCompare simplifies this process by allowing users to upload quotation PDFs, extract relevant information using a local AI model, validate financial details, compare suppliers, calculate transparent scores, and select the best choice based on the prices and scoring.

Key features include:

  • PDF quotation extraction: Extracts supplier names, prices, tax details, totals, and other quotation information.
  • Local AI processing: Uses Ollama to run an open-weight language model on the user's computer.
  • Financial validation: Checks totals and flags missing or uncertain information instead of silently guessing.
  • Supplier comparison: Displays quotations in a consolidated comparison table.
  • Supplier ratings: Allows users to enter public ratings and review counts manually.
  • Weighted scoring: Combines price and quality scores using configurable weights, these weights are variable and can be changed according to user preference.
  • Best Pick recommendation: Identifies the highest-scoring eligible supplier when sufficient valid information is available.
  • Privacy-focused design: Keeps PDF processing and AI inference local, without requiring a paid cloud AI API.

QuoteCompare is designed for event planners, procurement teams, small businesses, and anyone who regularly compares vendor quotations. The long-term goal is to turn a repetitive manual task into a faster, more transparent, and privacy-conscious decision-making process.

Demo

Code

QuoteCompare

QuoteCompare is a local-first quotation analysis and supplier comparison application built with Python, Streamlit, and Ollama. It helps users extract information from supplier quotation PDFs, review pricing details, compare offers, and evaluate suppliers using a weighted price-and-quality score.

Features

  • PDF quotation processing: Upload supplier quotation PDFs and extract structured information.
  • Local AI extraction: Use Ollama to process quotation content on your own machine.
  • Data normalization: Convert extracted values into a consistent format for comparison.
  • Quotation validation: Review totals, taxes, discounts, and other key quotation details.
  • Line-item matching: Compare related items across supplier quotations.
  • Supplier comparison: View supplier prices and quotation details in one place.
  • Quality scorecards: Record supplier ratings for reliability communication, service quality, and references.
  • Weighted ranking: Combine price and quality scores using a configurable weighting, with a default of 70% price and 30% quality.
  • Recommendation explanations: Understand how the scoring criteria contribute to supplier rankings.
  • Streamlit interface:…

The project is built in Python, with Streamlit providing the user interface. Its modular architecture separates PDF extraction, normalization, item matching, financial validation, scoring, and recommendations.

How I Built It

We built QuoteCompare using Python, Streamlit, Ollama, and Gemma 3:4B, an open-weight AI model that runs locally on our computers.

We chose Gemma 3:4B because we wanted to experiment with AI-powered document processing without depending on paid cloud AI APIs. Through Ollama, we can run the model locally and use it to help extract and interpret information from supplier quotation PDFs.

Gemma 3:4B acts as the AI-powered quotation information extraction and interpretation layer. When a user uploads supplier quotation PDFs, QuoteCompare extracts the document text and uses Gemma through Ollama to help identify and structure relevant information, such as supplier details, quotation numbers, prices, tax information, totals, and service descriptions.

Gemma does not make the final procurement decision or independently determine the winning supplier. Its extracted information is passed to Python modules for further processing.

The application follows a modular architecture:

  • PDF extraction: Reads text from uploaded supplier quotations.
  • AI-powered interpretation: Uses Gemma 3:4B through Ollama to help identify supplier details, prices, taxes, and quotation information.
  • Normalization: Converts extracted information into a consistent structure.
  • Financial validation: Uses Python to validate totals and flag missing or uncertain values rather than blindly trusting AI output.
  • Supplier comparison: Matches quotation items and organizes supplier information for comparison.
  • Weighted scoring: Calculates price and quality scores using Python, with a default weighting of 70% price and 30% quality.
  • Best Pick recommendation: Ranks eligible suppliers using their combined scores.

Streamlit provides the user interface, while Python handles deterministic calculations and business rules. Keeping these responsibilities separate makes the application easier to test, maintain, and improve.

One of our main design goals was privacy. With Ollama and Gemma 3:4B running locally, the core AI processing can happen on the user's own computer without sending quotation PDFs to a cloud AI service.

Building with open-weight AI has also allowed us to experiment with model behavior, control our costs, and create a practical application that combines AI interpretation with transparent, testable decision-making.

We deliberately keep financial calculations in Python rather than relying on the language model to perform arithmetic. The model helps interpret documents; deterministic code handles calculations and validation.

We also added automated tests to verify scoring behavior, validation rules, and recommendation logic.

Why Does Open Innovation Matter?

Open innovation made it possible for us to build an AI-powered application without depending on a paid, closed-model API.

Using Ollama and an open-weight model allows inference to run locally on our computers. This is especially useful because supplier quotations can contain commercially sensitive information, such as negotiated prices, vendor details, and event budgets.

A local-first architecture offers several advantages:

  • Privacy: Quotation documents do not need to be sent to a cloud AI provider.
  • Cost control: The core AI workflow does not require per-request cloud inference fees.
  • Control: We can experiment with different locally available models and compare their performance.
  • Transparency: The extraction, validation, and scoring logic is implemented in code that can be inspected and tested.
  • Accessibility: Small businesses and independent developers can experiment with document-processing AI without building an expensive cloud infrastructure.

My First User

My first user is Jayant Vishe, Account Manager at NHM, Thane District. His work involves handling quotations for various requirements, including stationery and office supplies, computer repairs and maintenance, vehicle rentals, outsourced cleaning services,etc.
I tried QuoteCompare to compare vehicle rental quotations and found it very helpful. It brought the quotation details together in a structured comparison table, making it easier to review different suppliers and evaluate their prices and offerings. The tool significantly reduced manual effort and saved valuable time that would otherwise be spent reviewing and comparing quotations individually. I found it useful for making the quotation comparison process faster, simpler, and more efficient.

Prize Categories

Best Use of Gemma
QuoteCompare runs Gemma 3:4B, Google's open-weight model, locally through Ollama as its document extraction and interpretation layer. Gemma reads each supplier quotation PDF and structures the supplier details, prices, tax information and totals. Its role is deliberately limited: the extracted data is then validated by tested Python code, which checks totals, flags missing or uncertain values, compares suppliers and ranks them. Running Gemma locally means commercially sensitive quotations never leave the user's computer, with no cloud AI fees.

來源:DEV Community · dev.to