AI Tool Selection Guide: Estimate Costs and Verify Capabilities with Your Own Data
Pricing, model versions, and benchmark scores change over time. All figures in this article are examples only. Before making any formal decision, verify the latest information on each platform's official pages and record the verification date on the day of testing. This guide covers how to evaluate coding assistants, test long-context handling, validate web search and RAG features, and estimate monthly API costs using your own data.
Pricing, model versions, and benchmark data all change over time. All figures given in this article are examples only. Before making any formal decision, check each platform’s official pages and record the verification date on the day you run your tests.
1. Evaluating General Capability and Coding Assistants
Public benchmarks are useful as an initial filter. MMLU (Massive Multitask Language Understanding) measures general knowledge, and HumanEval is commonly used for code generation. However, benchmark questions may already appear in training data, so a high score does not guarantee good performance on your own workloads. Public benchmarks cannot replace evaluation on your own business dataset.
Code generation results are usually reported as pass@1 and pass@k. pass@1 is the proportion of tasks where the model passes all tests in a single generation. pass@k is the proportion of tasks where at least one of k samples passes. These are different metrics—confirm which one is used before comparing.
When selecting a foundation model, focus on three points:
- Terms of use: Check free quotas, time or volume limits, call counts, rate limits, whether commercial use is allowed, and whether your input data is used for training.
- Language coverage: Can the model produce runnable code in mainstream languages such as Python, Java, and Go? Can it find and fix bugs in existing code?
- Deployment options: Models with open weights can be deployed on-premises or in a private cloud, making it easier to control data flows. However, the costs of GPU resources, operations, and model updates must be included in the total cost of ownership.
Coding assistant evaluation checklist (check each item, and record results and sample sizes):
- Code correctness: Across at least 50 real tasks, does the generated code pass unit tests?
- Repository understanding: Given a real multi-file repository, can the model accurately locate the relevant modules?
- Unit test success: Do the model-written unit tests run and pass in CI and cover the target branches?
- Change scope: Are changes confined to the task, without unrelated refactoring?
- Permissions and data flows: Does the tool need access to secrets, internal network addresses, or customer code? Does data pass through third-party servers, and how long is it retained?
- Failure handling: When errors occur, does the model explain the cause instead of fabricating an answer?
- Human review time: Record the manual time from generation to merge for each task.
2. Long-Text Processing Test Template
Many platforms advertise context windows of a million tokens. A token is the basic unit of text a model processes. Because tokenization differs by tokenizer, one Chinese character typically maps to 1–2 tokens, so 1 million tokens roughly corresponds to 500,000–1,000,000 Chinese characters. This is only an order-of-magnitude estimate; for exact counts, use the target model’s token counting API.
A larger window does not mean every part of the input is used accurately. Models are often weaker at retrieving information from the middle of long inputs than from the beginning or end—a phenomenon known as “lost in the middle.” Tests should include at least three task types:
- Needle-in-a-haystack test: Insert a key piece of information at different lengths and positions, and check whether the model can retrieve it.
- Business document test: Design questions from your own documents—contracts, financial reports, or case files—and have a human verify the answers.
- Tiered recording: Record accuracy, response time, and cost at different input lengths instead of focusing only on the maximum window parameter.
Use the following template. Test each tier at least 20 times and compute the hit rate.
| Input length tier | Insertion position | Model version | Tokenizer | Hit? | Response time (s) | Cost per call | Failure reason |
|---|---|---|---|---|---|---|---|
| 80K tokens | Beginning | To be recorded | To be recorded | Yes/No | To be recorded | To be recorded | To be recorded |
| 80K tokens | Middle | To be recorded | To be recorded | Yes/No | To be recorded | To be recorded | To be recorded |
| 80K tokens | End | To be recorded | To be recorded | Yes/No | To be recorded | To be recorded | To be recorded |
Lawyers reviewing case files, financial analysts studying reports, and graduate students organizing literature all work in scenarios with high requirements for information completeness. Model-generated summaries should cite the location in the source text to make human review easier.
3. Verifying Web Search and RAG
A large model’s training data has a cutoff date, so it easily makes mistakes on real-time news, stock prices, or weather. Retrieval-augmented generation (RAG) with web search retrieves pages first and then has the model answer based on the retrieved results, which reduces—but does not eliminate—such errors. “Web search” is a general product feature name, and RAG is one way to implement it; the boundaries of the two are not identical.
Trigger behavior varies across products. Some require users to manually enable search; others decide automatically based on the question. During testing, first record whether each question actually triggered a search—do not assume the model always searches.
Verification steps:
- Design 20 real-time questions covering news, prices, policies, and version numbers, and determine the correct answers in advance from authoritative sources.
- For each question, record whether search was triggered, plus the number and timestamps of returned sources.
- Open each cited link and confirm the page is accessible and its content actually supports the answer.
- Compare answers against the ground truth, and compute the accuracy rate, incorrect-citation rate, and unsupported-claim rate.
- For questions where search returns nothing or sources conflict, check whether the model states it cannot confirm, rather than giving a definitive answer.
Risk notes:
- Copyright: Web content may be copyright-protected. Generated content should attribute sources and avoid reproducing long passages verbatim.
- Privacy: Search queries and uploaded documents may be sent to third-party services. When customer or personal information is involved, assess the scope of outbound data first.
- Timeliness: Search results themselves may be outdated; record the retrieval date when citing them.
4. How to Estimate API Costs
For products billed by usage, monthly cost can be estimated with the following formula:
Monthly cost = Monthly requests × [ (Uncached input tokens × Input price + Cached input tokens × Cached input price + Output tokens × Output price) ÷ 1,000,000 ] × (1 + Retry rate)
