0

I'm trying to extract API integration parameters like Authorization headers, query params, and request body fields from API documentation. This is essentially a custom NER task.

I’ve experimented with LLaMA 3.1 and Mistral using Ollama, but both run too slowly on my local machine and even on Google Colab.

The challenge is that I don’t have a labeled dataset for this task. So I'm looking for a lighter or faster model (LLM or otherwise) that’s compatible with Ollama or suggestions for classic NLP/ML techniques (e.g. rule-based methods, CRFs, etc.) that can work without a labeled dataset

Any tips on using fewshot prompts effectively for this kind of extraction task

Has anyone faced a similar use case? I’d really appreciate any ideas, tools, or models that could help.

Thanks!

asked Jul 12, 2025 at 14:42
4
  • Can you share some sample data? Commented Jul 13, 2025 at 17:39
  • Sure! working with the following kind of API documentation: [uploads-ssl.webflow.com/5f08c2bdc085172b99006a91/… Commented Jul 14, 2025 at 17:19
  • For the example API you mentioned, there's no need to scrape the human-readable documentation. The full machine-readable OpenAPI JSON description is embedded directly in a <script> tag within the <head> of the page at demo.360alumni.com/api/doc Commented Jul 20, 2025 at 18:48
  • Thanks, @JukkaMatilainen, some APIs have proper OpenAPI specs in <script> tags, that works really well. But in my case, I am working with a lot of documentation that does not have these type of tags. Things like authToken or headers are often just mentioned in the text. Like "pass the token you got from the login call in the header as a Bearer token." These kinds of details are not usually part of the OpenAPI JSON, so I need to parse it to extract them. That’s why I’m focusing on extracting this info from the actual written content, not just the structured parts. Commented Jul 31, 2025 at 18:42

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.