Service
NLP development in Python
Python solutions that classify, extract, search and summarise text, using the simplest method that does the job well.
What it is
Natural language processing, or NLP, covers techniques that let software work with human language. Typical tasks include text classification, named entity recognition, information extraction, semantic search, sentiment analysis, summarisation and topic grouping.
LLMs have made many of these tasks faster to prototype, but they have not replaced everything that came before. Rules, traditional machine learning and embeddings all remain useful, and a good solution may combine several of them.
When it suits a project
NLP work suits a project when valuable information is locked inside text that people currently read and sort by hand: support tickets, forms, emails, reports or reviews. It tends to work best where the desired output can be defined clearly and some example data is available.
Choosing a method is largely a matter of trade-offs, which the guide on text classification with LLMs vs traditional NLP explores further:
- Rules and patterns suit predictable formats. They are fast, cheap and easy to explain, but brittle when language varies.
- Traditional machine learning suits repeated tasks with labelled data, and can run at low cost once trained.
- Embeddings suit similarity search, clustering and matching text by meaning.
- LLMs suit varied language and tasks with little training data, at the cost of more latency, usage cost and checking.
How it is typically approached
- Frame the problem. Define the inputs, outputs, categories and how the result will be used, including what happens to uncertain cases.
- Study real data. Look at samples for language variety, noise, duplicates and class imbalance before settling on a method.
- Create a labelled test set. Even a modest one gives an objective way to compare methods. Clear labelling guidelines matter, because people can disagree about the correct answer too.
- Establish a baseline. Try a simple approach first, so that any added complexity has to prove its worth.
- Measure appropriately. Use metrics such as precision and recall per class, because overall accuracy can hide poor performance on rare categories.
- Integrate and monitor. Wrap the solution in a service or batch job, route low-confidence results for review and watch for drift as the language in your data changes.
What I can help with
I can help with choosing a suitable method, preparing evaluation data, building the solution in Python and integrating it with your application. For pulling specific values out of text, see the guide on named entity recognition and data extraction with LLMs. Where a task calls for model-generated output, the work overlaps with generative AI and LLM development; where the goal is answering from documents, see RAG development.
Frequently asked questions
Does one method have to cover the whole project?
No. Decide per task. One system can use patterns for reference numbers, a trained model for routing and an LLM for free-text clauses, with a shared test set showing where each one is justified.
How much data does an NLP project need?
It varies with the method and task. Rules and LLM-based approaches can begin with few examples, though a labelled test set is still important. Training a custom classifier generally calls for more labelled data.
Can NLP handle languages other than English?
Often yes, but support and quality vary by language and tool. Performance should be tested separately on each language the project needs, rather than assumed.
How is NLP related to generative AI?
Large language models come out of NLP research, and generative AI is now one set of tools used for NLP tasks. NLP as a field also includes non-generative methods such as classification and entity recognition.