Fine-Tuning co:here Natural Language Generation
In the conclusion the output from two NLG models are compared, one model trained on ambiguous, overlapping and contradictory data. The second model on clean, domain specific data with short sentences.
co:here is an easy avenue to access large language models, for use cases like:
- Semantic Search,
- Summarisation, and
- Content Generation.
The speed and ease with which you can enter your own data, experiment fast and export API details from the playground for use in more production ready environments is very attractive.
👇🏼 Read more on clustering here:
Practical semantic search and clustering with HumanFirst
Semantic similarity is quickly becoming a mainstream technique for working with natural language data; embedding new…
Combing For Insight in 10,000 Hacker News Posts With Text Clustering
Hacker News is one of the leading online communities to discuss software and startup topics. I've frequented the site…
Impediments to NLP Access
Generally Impediments to NLP access are:
- Requirements for large datasets for training
- Long training times
- Specialised hardware
- Specific knowledge
All of these are negated with the help of a playground. Leveraging pre-trained large language models, small amounts of own data can be used to rapidly achieve results.
As seen above, the playground can act as an incubation area for projects to evolve into API’s, notebooks and general collaboration, eventually culminating in a product or application.
Above, all co:here playground activity can be exported in various formats.
Something to keep in mind with the co:here playground is that you will soon outgrow the playground in terms of:
- Size of datasets
- Customisation of results
- Pre and Post Processing
- and Obviously Integration
Hence the next step is notebooks and or API’s for collaboration and adding complexity, and finally productionising the functionality.
But what if the play can continue, and the playground can expand into a full-fledged no-code workbench…absorbing all the iterations from play to production in one cohesive no-code interface?
“The master in the art of living makes little distinction between his work and his play, his labor and his leisure, his mind and his body, his information and his recreation, his love and his religion. He hardly knows which is which. He simply pursues his vision of excellence at whatever he does, leaving others to decide whether he is working or playing. To him he’s always doing both. ”
― James A. Michener
Fine-Tuning co:here NLG
There are various options for NLG in the co:here playground, and we have seen quite a bit of NLG is used for automated copy writing, add creation and sumarization.
Below a sentence is given and co:here NLG completes the sentence. No fine-tuning was involved, and when running the routine, disparate and different results are given.
Below, is the notebook view of the playground example, execution speed is quick.
As seen below, fine-tuning models are listed here, and the fine-tuning can be launched with the click of button.
The separator needs to be defined and the text file can be uploaded. There is a minimum and ideal size for the test file.
Prior to the launching of the fine-tuning process, samples of the txt file can be viewed.
The initial status is queued, and from here the steps are: Processing data, Finetuning, Exporting Model, Deploying API and lastly Ready.
Progress can be tracked and an email is sent when the model is ready to be used.
Fully trained model and ready to be tested in the playground.
The fine-tuned model is listed with the other baseline models.
Why Natural Language Generation?
There is much talk about moving from a messaging bot to a truly conversational agent. In general we have progressed down the line from a click to navigate chatbot to more conversational interfaces. A few steps are required to get to a truly conversational interface.
These might include:
- Merging or blurring the lines between the four pillars of conversational frameworks, intents, entities, dialog flows and messages.
- Structure being added to intents and augmented intent management.
- Intents and Entities are merging
- More flexible dialog state management
- And NLG
Read more about this here…
Many of these elements are already evident in the Garner Conversational AI leaders.
As seen above, while chatbot functionality moves towards a truly flexible conversational agent, with virtually unrestricted compound natural language employed, certain changes need to take place. These are all listed on the left. Mass adoption of these new technologies will always lag behind availability.
Moving to a true conversational agent is also dependant on
- The AI tools being available, and
- Adoption of these tools.
Control & Flexibility
One of the biggest apprehensions around NLG is the danger of unpredictable, unwanted and unplanned response language being generated by the NLG.
The ultimate control is having a fixed and finite piece of text for every conceivable response to the user. Here values are often inserted within the text, very IVR like. (maximum control & minimum flexibility)
The ultimate freedom is to generate the conversational agent responses on the fly in realtime with no predefined script. All based on the context of the conversation. (maximum flexibility & minimum control)
Control and flexibility; these two need to be in balance:
- Control without Flexibility negates key conversational elements like digression, disambiguation, clarification, domain/relevance, compound intents & entities.
- Flexibility without Control definitely has a certain allure, but this gives rise to the lack of affordances for fine-tuning conversations. This is very much the case with OpenAI’s Language API. Immense flexibility which is enticing, but limited fine-tuning.
The process of fine-tuning is time-consuming and a large amount of data is required for the process. Key contributors to adoption will be:
- Prepared domain specific data sets which can be edited and used for training.
- Shorter training time for rapid iterations of training, testing & editing training data would be ideal.
- Regarding raining time, for generation, using a small model type, 3 to 5 hours. For representation it was significantly faster…going through iterations to tweak the NLG will be extremely time consuming. Especially in cases where a few iterations are required, or if the domain grows.
- Having an improved interface for guided crafting of training data.
- What might be convenient is an option to partial train on a sample of data for a more incremental approach.
- The two examples below indicates the importance of clean, coherent and related data. This first example is text generated using a model trained on very ambiguous, unordered data. The training data also have no distinct or specific domain or area of relevance. There was also much overlap in topics and sequence of words.
- The example below is based on a model trained on a banking / commerce customer utterances. And it generates questions a customer might ask pertaining to a specific topic or product listed as the source text to generate. The result is very accurate. A relevant implementation of this would be for a disambiguation menu. The user enters the words “termination fee” and four suggested intents are surfaced.
Cobus Greyling - City of Johannesburg, Gauteng, South Africa | Professional Profile | LinkedIn
Rasa Hero. NLP/NLU, Chatbots, Voice, Conversational UI/UX, CX Designer, Developer, Ubiquitous User Interfaces…
Cobus Greyling - Medium
Read writing from Cobus Greyling on Medium. NLP/NLU, Chatbots, Voice, Conversational UI/UX, CX Designer, Developer…
A Tour Of The co:here Playground
The Playground Gives Easy Access To Large Language Models
Home | Cohere
We've built a platform that can be used in different libraries that fit in every stack. No matter what your experience…
API Documentation | Cohere AI
Use the Cohere platform to build natural language understanding and generation into your product with a few lines of…
API Documentation | Cohere AI
Finetuning is the process of taking a pre-trained Large Language Model (LLM) and customizing it with a dataset to excel…
No-code tooling for NLU
Plug & Play,start right away HumanFirst replaces Excel, the need for specialized resources, or building & maintaining…