Artificial Intelligence

In this category we show you all Artificial Intelligence related blogpost.

picture of a pencil over an exam

Author: Favio Acosta – Alvaro Valbuena & Jorge Salgado

What will we discuss? 

This article covers topics around building large language models (LLMs) for specific purposes. As an example, we’ll look at using a model to answer advanced-level multiple-choice science questions. The model should provide, in order, the three most accurate options. For instance, a prompt-response pair might look like this: 

Prompt: What type of organism is commonly used in the preparation of foods like cheese or yogurt? 

a.Viruses 

b.Protozoa 

c.Cells 

d.Gymnosperms 

e.Mesophilic organisms 

Model Response: E, B, C 

This idea was inspired by a Kaggle challenge where multiple-choice questions were tackled with a 175-billion parameter LLM. The challenge was to address these questions with a model ten times smaller (tens of billions of parameters) without any internet connection (APIs, agents, etc.) (1). 

Given the computational nature of the LLM, you’ll need a GPU with around 15GB, like the Tesla K80 offered in Google Colaboratory’s free version. 

The Kaggle competition also provides a way to evaluate the model’s performance in the required format. This metric is called Mean Average Precision at K (MAP@K) and focuses on two aspects: 

  • Are the predicted options relevant? 
  • Are the most accurate options at the top? (2)

At the same time, the MAP@K formula is as follows: 

  • N questions = 200 
  • k position of the answer 
  • K possible positions = 3 

AP@K = rel(k)/k 

Donde rel(k) = 1 if the item in position 𝑘 is correct, 0 otherwise. 

MAP@K = 1/N * sum_k(AP@K) 

Formula for average accuracy in k (2)

The challenge will be tackled from the simplest and most intuitive solution to more complex approaches like fine-tuning the model and Retrieve Augmented Generation (RAG). The sections covered will include: 

1.Prompt Engineering 

2.Finetuning 

   a.What is LORA (Low-rank adaptation)?

   b.What is Q-LORA (Quantized Low-rank adaptation)? 

   c.Specific approach to the challenge 

3.RAG (Retrieve augmented generation) 

   a.Definition 

   b.Situations were it is useful  

   c.TDF-IDF approach 

   d.Sentence transformers approach 

4.Approach of another team 

5.Final observations 

1.Prompt Engineering 

Prompt Engineering involves structuring text that can be interpreted and understood by a generative AI model. A prompt is essentially a natural language text describing a task that AI should perform. 

Prompt engineering can be seen as an optimization process, where you start with an initial prompt and iteratively modify it until the model generates the desired response. 

Below is the process followed in prompt engineering and the outcomes at various steps, visualised to understand the iterative process.

Attempt 1 

An initial prompt is generated and analysed for modifications. The prompt used was:

“Assistant will answer a multi-choice question by giving 3 letters from the options given. The letters will be separated by commas. The order of the answers given by assistant are from the most likely correct to the least likely.”

Some initial results were:

1.<<Assistant:>> A, B, E

2.<<Assistant:>>

3.<<Assistant:>> A,B C, D, E

4.<<Assistant:>> Who was Giordano Bruno? A. A German philosopher

5.<<Assistant:>> A. MOND is a theory that reduces B. MOND is a theory that increases

Most responses were of types 3, 4, and 5, with few of type 1. So, the first modification to the prompt aimed to be more explicit about the model’s requirements. 

Attempt 2 

The modified prompt was:

“Assistant will answer a multi-choice question by giving 3 letters from the options given. The letters will be separated by commas. The order of the answers given by assistant are from the most likely correct to the least likely.”

1.<<Assistant:>> A, B, E

2.<<Assistant:>>

3.<<Assistant:>> A,B C, D, E

4.<<Assistant:>> Who was Giordano Bruno? A. A German philosopher

5.<<Assistant:>> A. MOND is a theory that reduces B. MOND is a theory that increases

The results were still mixed but showed an increase in type 1 responses. Further modifications were made to add more explicit instructions. 

Attempt 7

“Assistant will answer a multi choice question by giving 3 and only 3 letters from the options given. Assistant must separate the letters by comma. Assistant must give the order of the letters from the most likely correct to the less likely correct. Assistant will not give explanation in the answer. Assistant will only use the letters: A,B,C,D or E”. 

Here is a previous conversation between the Assistant and the Question of the user: 

\n<<Question:>> What type of organism is commonly used in preparation of foods such as cheese and yogurt 

<<Options: >> 

  1. viruses
  2. protozoa
  3. cells
  4. gymnosperms
  5. mesophilic organisms

<<Assistant: >> 

E,C,B 

<<End >> 

1.<<Assistant:>> A, B, E

2.<<Assistant:>> A

3.<<Assistant:>> A,B C, D, E

4.<<Assistant:>> Who was Giordano Bruno? A. A German philosopher

5.<<Assistant:>> A. MOND is a theory that reduces B. MOND is a theory that increases.

At this point, many model responses were in the desired format (type 1), but not all. Further iterations were done until all responses were in the desired format.

Several attempts later

system_prompt = “<s>” + B_SYS + “””Assistant will answer a multi choice question by giving 3 and only 3 letters from the options given. Assistant must separate the letters by comma. Assistant must give the order of the letters from the most likely correct to the less likely correct. Assistant will not give explanation in the answer. Assistant will only use the letters: A,B,C,D or E. Assistant will not give less than 3 letters for answer. Assistant must not use special characters in the answer. 

Here is a previous conversation between the Assistant and the Question of the user: 

\n<<Question:>> what type of organism is commonly used in preparation of foods such as cheese and yogurt 

<<Options:>> 

  1. viruses
  2. protozoa
  3. cells
  4. gymnosperes
  5. mesophilic organisms

<<Assistant:>> 

E,C,B 

<<end>> 

\n<<Question:>> What is the least dangerous radioactive decay… 

And with this prompt, the vast majority of responses given by the model were type 1 and 2.

1.<<Assistant:>> A, B, E

2.<<Assistant:>> A

But it could also be observed that a small group of answers caused the model to fail, i.e., the model’s answer was the same question with all answer options. At this point it was possible to draw the following conclusions:

  • This problem was not going to be solved by applying prompt engineering alone.
  • At this point it is necessary to rely on another technique such as finetuning.

2. Fine-tuning

Before describing the fine-tuning process, it’s important to understand why a full parameter training wasn’t considered.

One might argue that the best results for a specific LLM purpose would come from a full parameter training with a robust dataset. However, this path requires:

  • Significant computational power
  • Time availability, potentially days depending on the case

For example, training an early version of OpenAI’s GPT model with 30 billion parameters from scratch cost around USD $450,000 and took about 36 days .

Fortunately, for developers and companies with fewer resources, solutions exist that, while not matching the results of full training, offer acceptable numbers and require far fewer computational resources and time. Often, a 15GB GPU like the Tesla K80 from Google Colaboratory’s free version is sufficient. This solution involves fine-tuning through Low-rank adaptation (LORA).

What is LORA?

LORA or Low-rank adaptation is a methodology for fine-tuning LLMs with billions of parameters. It involves training only a percentage of the total parameters in the model’s attention layers, significantly reducing computational costs.

LORA decomposes the original weight matrix into two lower-rank matrices. Here’s a representation:

|P11 P12 P13 …     P1n | 

|P21 P22 P23 …     P2n | 

|P31 P32 P33 …     P3n | 

|Pm1 Pm2 Pm3 … Pmn | 

M = 4096, N = 4096  

LORA (r = 3) —–> 

|P11 P12 … P1n| |P11 P12 P13 | 

|P21 P22 … P2n| |P21 P22 P23 | 

|P31 P32 … P3n| |…     …     … | 

|Pm1 Pm2 Pm3 | 

This matrix is decomposed into two lower-rank matrices that are trained like NLP models. The final weights are added back to the original matrix. The steps are:

  1. Decompose the original matrix into two lower-rank matrices.
  2. Train these two matrices.
  3. Add these matrices back to the original matrix.
  4. Build the final fine-tuned model .

What is Q-LORA?

Quantized Low-rank adaptation (Q-LORA) optimizes LORA by using high precision for computation (16 bits) and low precision for storage (4 bits), reducing training time, disk memory, and computational capacity.

Specific Approach to the Challenge

Given limited resources, Q-LORA was chosen to address inconsistent results not resolved by prompt engineering alone. Training was done on a machine with a 25GB GPU, but a 15GB GPU like in Google Colaboratory’s free version would suffice.

Through fine-tuning iterations, hyperparameters were calibrated. Here are some training characteristics:

  • r = 16, alpha = 32 – Model = Llama 13B chat – Result = 0.57
  • r = 32, alpha = 64 – Model = Llama 13B chat – Result = 0.59
  • r = 64, alpha = 128 – Model = Llama 13B chat – Result = 0.598
  • r = 256, alpha = 512 – Model = Llama 7B chat – Result = 0.387
  • r = 256, alpha = 512 – Model = Llama 13B chat – Result = 0.613
  • r = 256, alpha = 1024 – Model = Llama 13B chat – Result = 0.606

Here, r is the rank of the decomposed matrices, and alpha is their scaling factor before summation with the original matrix. Generally, alpha is twice the r value. Configuration 4 provided the highest MAP@K value so far.

Contrary to expectations, larger r-alpha configurations do not always yield better results, as seen in configuration 6.

3. Retrieve Augmented Generation (RAG)

WHAT IS RAG?

RAG allows additional information to be provided to a model. First, relevant information for the prompt (a question in this case) is retrieved. Second, this context is given to the model to generate a more accurate response .

RAG can be likened to a student taking an open-book exam. Conventionally, the model is trained with all necessary information (akin to the student studying the entire semester). RAG, however, allows the student to look up relevant information in a book, saving time and effort during response generation.

Typically, RAG uses internet access, but competition rules prohibited this.

WHEN IS IT USEFUL?

RAG is beneficial when the model (or student) cannot recall everything simultaneously and might confuse information from different sources. RAG allows knowledge to be sectioned and classified for more accurate responses when there is too much information .

If resources or time for training a model with new information are lacking, RAG dynamically updates the model’s available information. It also aids models with limited memory. By providing more specific or accurate information, the model can give more appropriate responses. For example, asking for the value of “c” without context might yield the speed of light or a molar concentration. RAG provides the precise context needed.

Context length is limited by chunk sizes, generally under 500 characters, but this can vary with the sentence transformer.

TF-IDF VS SENTENCE TRANSFORMERS

Our experiments aimed to find a more accurate method for context retrieval. Comparing TF-IDF and sentence transformers, TF-IDF proved better for matching prompts with text paragraphs.

TF-IDF

TF-IDF finds similarity between text embeddings based on characters.

SENTENCE TRANSFORMERS

Sentence transformers are basic language models that determine text similarity based on semantic content, identifying similar themes despite different wording.

Interestingly, despite being more sophisticated, sentence transformers underperformed compared to TF-IDF. One hypothesis is that since questions were based on Wikipedia texts, and retrieved texts were also from Wikipedia, the words between sources and questions were the same. ChatGPT does not drastically change words used in Wikipedia pages.

4. OTHER TEAM APPROACH

  • Our team had 270 thousand high quality Wikipedia articles for the RAG. The first place team had over two million.
  • The same team used sentence transformers specifically 5e-large and gte-large to transform the texts into embeddings, then used cosine similarity to find the most relevant texts.
  • For inference, they use a model trained by them, from a model called openorca. This model is an instance of an AutoModelForCausalLM from the huggingface transformer library.

 

5. Concluding remarks

The other teams had a larger and better quality database. Halfway through the competition, one participant released a processed Wikipedia dataset and that greatly increased the scores of several participants. Prior to this, open Wikipedia datasets (such as HuggingFace’s and TenserFlow’s) were missing data such as numerical data, since this data is elsewhere in the HTML.

Getting the relevant contexts based on paragraphs is better than whole articles. An example is that the answer to a question may be in an article that has nothing to do with that topic. Also, the answers to questions are usually very localized in paragraphs and not scattered throughout the text.

There are two methods for finding relevant contexts, slow but accurate and fast but imprecise. FAISS (Facebook AI Similarity Search) is a library designed to find context quickly [11], however, in a competition like this, a search of several minutes is preferable to a slightly less accurate search of a few seconds. In production environments, a fast and slightly imprecise method may be preferred.

The first four groups had a solid retrieval and data processing pipeline [10], and arrived at these positions with carefully trained DeBerta V3 models. A tip given by team 1 and 19 is to train the model with bad context to prepare the model for the worst case, which is when the context the model receives is bad. In conclusion, small optimizations made the difference.

REFERENCES

favio casas

Favio Acosta – Data Scientist

alvaro valbuena data scientist

Alvaro Valbuena – Data Scientist

picture of jorge salgado data engineer

Jorge Salgado – Data Engineer

EQUINOX

Learn more about custom ai

chess game seen through computer vision
illustration of a tech brain

Author: Alejandro Salamanca – Head of AI and Data Science

AI Game Plan for businesses is not merely a consulting service; it’s a strategic partnership designed to demystify Artificial Intelligence (AI) and guide businesses toward a future where AI seamlessly integrates with company strategy. By instructing and demystifying AI, we lay a common ground for discussing both strategy and AI, insisting on the use of credible sources. From the outset, we engage clients in understanding the implications of AI for their business, paving the way for transformative change. 

WHO IS IT FOR? 

AI Game Plan is ideal for businesses aiming to incorporate AI into their strategic framework. It’s particularly suited for businesses that are looking to understand the current landscape of AI technologies, how these can enhance their operational efficiency, competitiveness, and innovation, and how to harmonise human and machine intelligence to create a collective intelligence that propels the organisation forward. 

THE AI GAME PLAN APPROACH 

Our approach emphasises a human-machine vision akin to collective intelligence, making businesses more competitive by translating this into concrete strategies. Pilot projects under AI Game Plan respect this vision, prioritizing the human element within the loop. This focus not only yields more precise results through leveraging business knowledge and human feedback but also ensures that the integration of AI enhances rather than replaces human capabilities. 

THE AI GAME PLAN METHODOLOGY 

Our methodology is detailed and iterative, ensuring that AI integration aligns with and supports your business goals: 

Instruction and Desmythification: We begin by instructing our clients about the various domains of AI, debunking myths, and building a common understanding necessary for strategic discussions. From classical AI to NLP, Computer Vision, and Generative AI. This foundation supports the subsequent steps where AI’s potential to transform business processes is explored and conceptualized. 

Strategic Alignment with Organisational Goals: It is crucial to align AI initiatives with the company’s strategic goals, whether focusing on cost reduction, product differentiation, or quality improvement. We ensure AI serves as a lever to augment these goals, respecting the company’s budget constraints and innovation methodologies. 

Assessment of the Current State (AS IS): Using Design Thinking methodologies, we assess how technology is currently utilized within the organization. This evaluation helps in understanding how AI can be integrated into existing workflows, the readiness of your data infrastructure for AI, and the suitability of tools for developing AI solutions. 

Identification of Opportunities and Pain Points: We identify processes where AI can provide unique value—mapping bottlenecks, pain points, and repetitive tasks. Using insights from the strategic alignment and current state assessment, we prioritize problems and opportunities, which leads to a prioritized backlog of potential AI projects. 

Pilot Projects and Scaling: Projects start as pilots or proof of concepts to demonstrate the practical benefits of AI solutions. Successful pilots evolve into full-scale projects or internal products with defined KPIs to measure business impact, continually iterated and maintained as part of the product lifecycle. 

KEY STRATEGIES 

Human-Machine Collaboration: The vision of Equinox is to foster a form of collective intelligence, where the synergy between human insights and machine precision creates unparalleled competitive advantages. We guide companies in determining how tasks can be optimally divided between humans and machines, enhancing processes to utilize both capabilities effectively. 

Non-Goal of Complete Automation: Emphasizing that the objective is not to pursue complete automation. Instead, selecting projects where having a human in the loop adds value, recognising the importance of human intuition and insight in the AI integration process. 

BENEFITS OF ENGAGING WITH AI GAME PLAN 

Customised Strategic Roadmap: Businesses receive a tailored roadmap for AI adoption that aligns with their strategic goals and operational needs, ensuring meaningful impact on the company’s future. 

Enhanced Competitive Edge: By integrating AI in ways that respect and enhance human input, companies can achieve superior outcomes, distinguishing themselves in the marketplace. 

Improved Operational Efficiency and Innovation: The strategic use of AI fosters innovation and streamlines operations, enabling businesses to adapt to future challenges and opportunities. 

Empowered Decision Making: With a clear understanding of AI’s potential and strategic integration, businesses can make informed decisions that propel them ahead of the curve. 

CONCLUSION 

AI Game Plan is more than a consulting service; it’s a strategic ally for businesses navigating the complexities of AI integration. By focusing on the synergy between human and machine intelligence, respecting the human element, and aligning AI initiatives with strategic objectives, we help organizations not just adopt AI, but do so in a way that prepares them for a future of innovation, competitive advantage, and strategic growth. With AI Game Plan, businesses are not just preparing for the future; they are shaping it. 

alejandro salamanca

Alejandro Salamanca – Head of AI and Data Science

EQUINOX

Learn more about custom ai

chess game seen through computer vision
robot reading a tablet

Author: Diana Perez – RPA Engineer

In the dynamic landscape of modern business, where competition is fierce and the pace of change relentless, companies are constantly seeking for innovation through Smart Automation for Digital Transformation to optimise their operations. Smart Journey Automation (SJA) is an innovative service we offer that leverages intelligent automation to address the challenges faced by businesses today. By seamlessly integrating Robotic Process Automation (RPA) and Artificial Intelligence (AI), SJA provides companies with the tools they need to enhance profitability, prevent costly errors in back-office processes, implement projects with technical and business governance, boost digital transformation and achieve operational efficiency as a competitive strategy. 

Source: Adapted from Datarobot

Smart Journey Automation (SJA) is aimed to meet the needs of forward-thinking businesses across various industries. Whether you are a small startup looking to streamline operations or a large corporation aiming to stay ahead in the digital landscape, our service caters to organisations of all sizes. It is particularly beneficial for companies striving to increase their Profit-per-employee, mitigate risks associated with back-office processes, and optimise operational efficiency while navigating the complexities of digital transformation. By leveraging SJA, companies can optimise their workforce and reallocate resources to more value-added tasks, driving higher profitability. 

Our service offers a unique value proposition by combining the power of BPM (business process management), RPA (robotic process automation) and AI (artificial intelligence) through our proprietary methodology, AURORA. This approach allows businesses to unlock unprecedented efficiency gains and cost savings while minimising the risks. By automating routine tasks and leveraging AI-driven insights, companies can make data-driven decisions, improve employee productivity and development, and enhance overall business performance. Additionally, we have a develop strategy centred in our Centre of Excellence (CoE) with comprehensive technical and business governance, ensuring smooth implementation and ongoing support for automation initiatives. 

image of a robot hand using ai

Taken from: https://blogs.idc.com/2024/04/15/the-rise-of-ai-generated-content-in-the-experience-orchestrated-business-era/

At Equinox, we implement SJA through our structured methodology designed to guide companies through every step of their digital transformation journey. Our approach begins with a comprehensive assessment of existing processes to identify automation opportunities and establish clear objectives, also identify AI applications. We then design customised automation solutions tailored to the unique needs of each client, leveraging our expertise in RPA and AI technologies.

Throughout the implementation phase, our multidisciplinary Centre of Excellence (CoE) provides guidance and support, ensuring successful deployment and continuous optimisation of automation processes. This is an Agile-based methodology which allows the team and client not only to iterate and measure the benefits but also to have value on each iteration to see real progress in their solutions. 

SJA can be applied across a wide range of industries, including finance, healthcare, manufacturing, retail, and more. For example, in the finance sector, our service can automate repetitive tasks such as invoice processing and account reconciliation, improving accuracy and reducing processing times. In Human Resources, automation can streamline talent acquisition processes, enhancing candidate relations with the process and administrative efficiency. Regardless of the industry, Smart Journey Automation empowers organisations to achieve greater agility, resilience, and competitiveness in today’s digital economy. 

We had the opportunity to collaborate with our holding company, Asesoftware*, to deploy Smart Journey Automation within. As a leading company in the software services development, they encountered similar challenges to many other organisations: sluggish manual processes, multiple repeated questions about processes, risks of human errors, and the inconvenience faced by employees in completing tedious administrative tasks. 

With Smart Journey Automation, we effectively tackled some of these challenges. We implemented a solution automating processes such as frequently asked questions about administrative process and the holiday and sickness management with an administrative and interactive chatbot, leveraging our AURORA methodology and Equinox’s CoE approach.

Consequently, Asesoftware, experienced a reduction in the time the area leaders dedicated to answer questions and time employees spend in administrative process that have multiple applications involved, enhancing efficiency, and heightened employees’ satisfaction. This case study underscores how Smart Journey Automation can yield tangible and substantial results for businesses, irrespective of their sector, scale or advance in their digital transformation process.

*To learn more about Aseosftware’s AI strategy click here.

Chatbot demo for Asesoftware

Smart Journey Automation offers a transformative solution for businesses seeking to thrive in an increasingly digital world. By harnessing the power of Smart Automation, companies can overcome the challenges of Digital Transformation. With Equinox’s expertise and proven methodology (AURORA), organisations can embark on their automation journey with confidence, knowing they have the support and guidance needed to succeed. 

diana perez

Diana Perez – RPA Engineer

EQUINOX

Learn more about custom ai

chess game seen through computer vision

Author: Deivid Toloza – Data Engineer

Technology has become a fundamental part of our daily lives. It has changed the way we communicate, work and learn. In the information era, you can access quality academic resources from anywhere in the world and learn virtually about almost any subject if you know how to search. 

Education has become more accessible and comfortable, and effective learning options have emerged that depart from traditional methods. In the language field, artificial intelligence has developed revolutionary technologies such as large language models (LLMs) capable of understanding and reasoning on texts or models of voice recognition, able to clone voices and translate an audio input into a language of our choice. The possibilities offered by these new technologies are still being explored, and there is much potential for them in the education field. In this article, we will explore the transformative potential of artificial intelligence in language teaching.   

The Evolution of Language Learning 

Throughout history, language teaching methods have continuously evolved, driven by advances in understanding human learning and technological advances. At first, traditional methods focused on memorising vocabulary and grammar rules, leaving aside the practical context of language use [1]. Over time, more interactive and student-centred approaches have emerged. 

At the end of the 20th century, communicative methodology gained prominence, highlighting the importance of authentic and situational communication over mere memorisation. This paradigm shift recognised the relevance of oral practice and cultural immersion for effective language learning, inspiring us to embrace the richness and diversity of languages and cultures. 

In the contemporary era, integrating artificial intelligence has led to a new phase in the evolution of language teaching methods. The ability of algorithms to adapt to students’ individual needs, provide instant feedback, and provide personalised learning environments has marked a significant milestone. Technology has not only facilitated access to online educational resources. Still, it has also enabled interactive and immersive experiences, transforming language teaching into a dynamic and effective enterprise where technology becomes a valuable ally in the student’s language journey.  

The Role of AI in Language Teaching

In this section we will address artificial intelligence technologies used for language learning tools. 

Natural Language Processing (NLP):  

NLP is a branch of artificial intelligence that enables computers to understand, interpret, and generate human language. AI language teachers rely on NLP algorithms to process text and speech input from students, analyse their language proficiency, and provide appropriate responses and feedback. 

Speech Recognition:  

AI language teachers often incorporate speech recognition technology to understand spoken language input from students. Speech recognition algorithms convert audio signals into text, allowing the AI to assess pronunciation, fluency, and intonation. 

Machine Learning Models:  

AI language teachers use machine learning models trained on large amounts of language data to perform various tasks, such as language translation, grammar correction, and semantic understanding. These models are continuously improved and refined through feedback from student interactions. 

Advantages of AI in Language Education

Personalised learning experiences. 

To provide personalised learning experiences, AI language teachers use algorithms that adapt the curriculum, lesson plans and exercises based on each student’s level of competence, learning goals, and performance. These algorithms can use techniques such as collaborative filtering, reinforcement learning or deep learning to optimise learning outcomes for individual students. 

Accessibility and affordability. 

AI language teachers are available 24/7, allowing students to learn at any time that suits their schedule. This flexibility is especially advantageous for busy professionals, students with demanding schedules or individuals in different time zones who may have difficulty attending a traditional language class during fixed hours.  

Also, AI language learning platforms can be more cost-effective than traditional language learning methods, such as hiring private tutors or attending language schools. Many of these applications offer affordable subscription plans, free trial periods or pay-per-use options, making language education more accessible to people with limited financial resources. 

Real-time feedback and assessment

AI language teachers generate feedback on students’ language skills using algorithms that analyse their responses and compare them to the correct answers or predefined language rules. Feedback may include corrections for grammar errors, corrections for pronunciation, suggestions on better vocabulary to express yourself and encouragement. 

Challenges and Concerns

Accurate Assessment 

Accurate assessment of language competence is essential for effective language education. However, AI systems may need help providing accurate assessments of language skills, particularly in areas such as fluency, pragmatism and cultural competence. Automated classification of open responses or assessments of conversational flows still presents challenges for AI. 

Lack of social interaction: 

Language learning is inherently social, involving human interaction to practice speaking, listening, and cultural exchange. AI teachers may have difficulty replicating the richness of face-to-face interactions, including nonverbal language, spontaneous dialogue and social dynamics, which are crucial for language acquisition. 

Bias and Cultural Sensitivity 

AI systems trained on biased or unrepresentative data can unintentionally promote stereotypes, cultural prejudices or offensive language. Ensuring that AI language teachers are culturally sensitive, inclusive and respectful requires careful curation of training data and continuous monitoring. 

*To learn more about bias read our article: Handy resources to avoid cognitive biases in Data Science

Success Stories and Case Studies

loora app icon

Loora is a mobile application that uses artificial intelligence to teach the English language. It is available for iOS and has a solid 5.0 rating in the app store, being the second-best application in the education category after Duolingo. It offers instant feedback on grammar and pronunciation, dynamic conversations based on real-life scenarios, such as business meetings, job interviews or conversations with friends, and evaluation metrics that increase the effectiveness of the learning process. 

elsa ai icon

I met Elsa AI in a bar in downtown Bogota, where the dynamics of language exchange occur. They label tables with languages so you can have a French table, an English table, a German table and so on. They make sure there is at least one native speaker per table so that the conversation in that language can take place. At an English table, a lady showed me this app and said that a teacher from a recognised language institute recommended it to strengthen her learning. It offers the possibility of following conversations with real-life scenarios and creating scenarios of our own describing the context of the situation you want to talk about. It also gives instant feedback on pronunciation, vocabulary and grammar. Right now, it is only available for English learning. 

duo lingo max icon

Duolingo Max is a new subscription model for the king of education applications that offers two new AI-powered features. These new features are: Explain My Answer and Roleplay. 

Explain My Answer allows learners to learn more about their response in a lesson, whether their answer was correct or incorrect. By tapping a button after certain exercise types, learners can enter a chat with Duo to get a simple explanation of why their answer was right or wrong and ask for examples or further clarification.  

Roleplay allows learners to practice real-world conversation skills with world characters in the app. 

The only courses that can utilise these new features are Spanish and French for English speakers on iOS. Right now, Duolingo Max is available in the U.S., Great Britain, Ireland, Canada, Australia, and New Zealand.  

Ethical Considerations

Privacy and data security: 

AI language learning platforms collect and process large amounts of data from students, including language proficiency levels, learning preferences and performance metrics. It is essential to protect this data against unauthorised access and misuse. Transparency about data collection practices, user consent and robust security measures are necessary to protect students’ privacy. 

Bias and Cultural Sensitivity 

AI systems may inherit biases from the data in which they are trained, leading to unfair or discriminatory outcomes, particularly for marginalised or underrepresented groups. Prejudices in language teaching can manifest in various ways, such as favouring particular dialects or cultural norms over others, reinforcing stereotypes or perpetuating linguistic discrimination, which refers to the prejudicial treatment of an individual for their way of speaking. Addressing bias requires diverse and representative training data, continuous monitoring, and mitigation strategies to ensure fair and equitable treatment for all students. 

Quality of instruction: 

While AI language teachers can provide personalised learning experiences and instant feedback, they may lack the pedagogical experience, cultural sensitivity, and empathy of human teachers. There is a risk that AI-based instruction prioritises efficiency and standardised metrics over the human features of language, such as critical thinking, creativity and emotional expression. A balance between the benefits of AI technology and the value of human interaction and experience in language education is essential.   

Conclusion

In conclusion, the integration of artificial intelligence as a language teacher represents a transformative change in education, offering unprecedented opportunities for personalised, accessible and effective language learning experiences. 

As with any technological advancement, ethical considerations should guide the responsible implementation of AI in language education. Concerns such as privacy, bias and the quality of the instruction require measures to ensure the preservation of human-centered values in the implementation of this technology in the educational field.  

Looking ahead, the future of AI as a language teacher is very promising and full of potential. Continuous advances in AI and other cutting-edge technologies, such as augmented reality, may create a new educational environment with immersive, interactive and adaptive learning experiences. 

References

  1. Enlighten (no date) Language Teaching Methods: An Overview. Available at: https://sites.google.com/view/enlighteneng/blog/tefl-theory-and-methodology/language-teaching-methods-an-overview#h.p_OhI852jgjYCA (Accessed: 23 April 2024).

  2. Loora (no date) Loora. Available at: https://www.loora.ai/ (Accessed: 23 April 2024).

  3. Duolingo (no date) Introducing Duolingo Max: a new way to accelerate your learning. Available at: https://blog.duolingo.com/duolingo-max/ (Accessed: 23 April 2024).

  4. ELSA Speak (no date) AI. Available at: https://elsaspeak.com/en/ai/ (Accessed: 23 April 2024).

deivid toloza picture

Deivid Toloza – Data Engineer

EQUINOX

Learn more about custom ai

chess game seen through computer vision
custom ai for competitive advantage

Author: Carla Acosta – Visual Designer

Custom AI solutions offer many advantages over off-the-shelf AI products, providing businesses with customised, high-performing systems that integrate seamlessly with existing workflows. These bespoke solutions are designed to meet the unique needs of specific industries or organisations, resulting in improved performance, data privacy, and security. Although they require upfront investment, tailor-made AI solutions are more cost-effective in the long run1, offering continuous improvement and innovation tailored to evolving requirements. 

WHO IS IT DESIGNED FOR? 

Our tailored AI service, Custom AI, is specifically designed for organisations seeking to integrate AI into their internal processes or enhance their market offerings to attract and retain more clients. Whether streamlining operations, improving product features, or delivering personalised services, Custom AI is tailored to meet small and medium businesses’ unique needs and objectives, aiming to leverage AI for strategic growth and competitive advantage. 

BENEFITS OF CREATING YOUR OWN AI SOLUTION 

Customisation: Custom AI solutions can be specifically designed by our AI Designers and Data Scientists to address the unique needs and challenges of your particular business or industry. This level of customisation allows for greater flexibility in meeting specific requirements and achieving desired outcomes. 

Improved Performance: By customising AI algorithms and models to the specific problem domain, businesses can achieve higher performance levels compared to using off-the-shelf AI products. Fine-tuning algorithms and models for specific tasks can improve accuracy, efficiency, effectiveness and data analysis. 

Integration with Existing Systems: Custom AI solutions can be seamlessly integrated into existing systems and workflows within an organisation; in our case, we have specialists for different environments and clouds. This integration ensures that the AI solution complements existing processes rather than disrupting them, leading to smoother implementation and adoption. 

Data Privacy and Security: Custom AI solutions provide greater control over data privacy and security. By building AI systems in-house, businesses can implement robust security measures and ensure compliance with relevant regulations, reducing the risks associated with handling sensitive data. 

Scalability: Custom AI solutions in Equinox AI Lab are tested with a PoC, and then built as an MVP, allowing them to quickly scale up or down based on changing user needs and requirements. This scalability ensures that the AI solution remains effective and efficient as the company grows or evolves. 

 Competitive Advantage: Custom AI solutions can provide a significant competitive advantage by enabling businesses to differentiate themselves in the market. By leveraging AI to address specific challenges or deliver unique value propositions, companies can stand out from competitors and capture market share. 

 Better Alignment with Business Objectives: Custom AI solutions are developed with a deep understanding of the business objectives and requirements; with our AI4UX methodology, we ensure proper data, stakeholders, science and model comprehension. This alignment ensures that the AI solution delivers tangible business value, improving operational efficiency, enhancing customer experience, or driving innovation. 

 Ownership and Control: Building Custom AI solutions allows businesses to retain ownership and control over the technology and its intellectual property. This ownership provides greater flexibility in terms of customisation, future development, and strategic decision-making. 

 Cost-effectiveness in the Long Run: While developing Custom AI solutions may require upfront investment in terms of time, resources, and expertise, it can be more cost-effective in the long run compared to purchasing and customising off-the-shelf AI products. Custom solutions are tailored to specific needs, reducing unnecessary features and expenses. 

AI4UX: OUR METHODOLOGY TO DELIVER CUSTOM AI 

The AI4UX methodology is the process that allows us to design intelligent solutions for all types of business. This step-by-step process involves periods of concept experimentation and system training, which are necessary in any IA solution to ensure its viability, scope and impact. Additionally, AI4UX takes the foundations of science, research and design to encompass the multiple strategic fronts of a holistic solution. 

AI4UX Illustration

CUSTOM AI IN THE REAL WORLD

We worked with a client who had a specific pain point that AI could solve. The Colombian Constitutional Court (CC) encountered challenges with search queries from verdicts of past judicial processes as they often failed to align with user requirements, making it difficult to consult how other lawyers and judges approached similar situations.  

Leveraging the expertise of our AI designers and data scientists, we devised a strategy to optimise Elasticsearch functionality by refining index configurations and harnessing NLP insights to streamline data retrieval.  

This involved incorporating new search features such as synonyms, tags, and NLP pipelines, ultimately facilitating comprehensive information retrieval using simplified language. 

 To learn more about this use case, click here. 

Conclusion 

Custom AI solutions offer tailored systems that seamlessly integrate with existing workflows, providing enhanced performance, data privacy, and security for businesses across various industries. Designed to meet specific needs and objectives, Custom AI enables improved performance, seamless integration, enhanced data privacy and security, scalability, competitive differentiation, and better alignment with business objectives. The AI4UX methodology ensures strategic alignment with user experience and business goals, while real-world applications demonstrate the tangible impact of Custom AI in driving operational efficiency. Ultimately, Custom AI represents a transformative approach to leveraging artificial intelligence, offering businesses the opportunity to tailor solutions that address current challenges and pave the way for future innovation and growth, thereby revolutionising how organisations harness the power of AI in today’s dynamic business landscape. 

References 

carla acosta

Carla Acosta – Visual Designer

EQUINOX

Learn more about custom ai

chess game seen through computer vision

Author: Daniela Zarate – Data Engineer 

It is possible to calculate image similarity for public security with Artificial Intelligence. Vector embeddings allow for the representation of images, audio recordings, videos, among others, in vectors and quantify the similarity between two objects through the distance between the vectors.

An artificial neural network is a common tool for training a model to calculate vector representations of images (vector embeddings). Once the images are translated into vectors, the similarity between vectors must be calculated. Algorithms like KNN use distance metrics between vectors to determine similarity. The smaller the distance value, the more similar the images will be.

The use cases of image similarity for public security with artificial intelligence are countless; however, in this text, the field of public security will be explored in depth, more specifically in the fight against the disappearance of people, a recurring crime worldwide.

How can we calculate how similar one image is to another?

Through a deep learning model, images are translated into a vector of decimal numbers between 0 and 1; this process is called vector embedding. The resulting vectors are usually high-dimensional. Images can be embedded using models such as convolutional neural networks (CNN).

vector embedding of the image of a cat

Illustration 1: Vector embedding of the image of a cat.

Convolutional neural networks (CNN) offer solutions for advanced image detection and classification. Unlike a conventional neural network, the convolutional neural network increases the accuracy of the results, by changing the size, rotation, or position of the image, the model will still detect it correctly.

The inputs of the neural network are characteristic; in the case of an image, each pixel is placed in a neuron of the input layer. If you work with a black and white image, each pixel has a value which ranges from 0 for black to 255 for white. Therefore, convolutional neural networks seek to enhance a process that receives the pixels of an image, extracts the features, and classifies them with regular layers. As we provide the model with examples during training, it will discover which features are worth identifying.

raw images represented as pixels with a convolutional neural network

Figure 2: Raw images represented as pixels with a convolutional neural network.1 

To implement the algorithm that allows us to obtain vector embeddings, it is possible to use a pre-trained model such as TensorFlow Hub, an open repository and a library for reusable machine learning.

image similarity with deep learning

Illustration 3: Implementation of the pre-trained model – Taken from https://towardsdatascience.com/image-similarity-with-deep-learning-c17d83068f59 2 

image similarity code with deep learning

Illustration 4: EmbeddingTaken from https://towardsdatascience.com/image-similarity-with-deep-learning-c17d83068f59 2 

Once the vector of decimal numbers between 0 and 1 that represents the image is obtained, distance metrics such as the cosine distance are used with the SciPy or Sklearn library. Cosine similarity measures the similarity between two vectors by calculating the cosine angle between them. The smaller the distance value, the more similar the images will be. The cosine distance between and is defined as the scalar product of the two vectors divided by the product of the magnitudes of the two vectors.

distance between vectors

Illustration 5: Calculation of the distances between vectors

The following image shows the result of the distances between the vectors that represent pet images, using the pre-trained model of TensorFlow Hub.

distance between vectors table with pets photos

Illustration 6: Distances between the vectors of pet images

On the other hand, the following image shows the result of the distances between the vectors that represent the images of people and a dog. You can see that person 2 and person 2_1 are the same person, so a short distance is plotted between those two vectors. It also detects a similarity between person 2 and person 3.

distance between vectors table with people photos

Illustration 7: Distances between the vectors of images of people

Use of image similarity with AI in public safety 

The application of image similarity in public security represents a significant advancement in leveraging artificial intelligence (AI) to address critical societal issues, particularly in the fight against human trafficking.
The use of image similarity tools, such as the ones developed by Marinus Analytics, exemplifies how AI can offer innovative solutions to enhance the effectiveness of these agencies.

Marinus Analytics, established in 2014 by a team of women entrepreneurs, specialises in the development of AI-based tools to aid law enforcement and humanitarian agencies. Their flagship software, Traffic Jam, is at the forefront of this technology’s application in public security. Traffic Jam is designed to analyse vast amounts of online data, including photographs from internet advertisements related to sexual services, many of which are posted by or on behalf of human trafficking victims.

One of the critical features of Traffic Jam is its FaceSearch capability, which employs advanced image similarity algorithms to match photographs of missing persons or suspected victims with images found online. This capability has proven to be invaluable for law enforcement agencies in expediting the identification and rescue of human trafficking victims.

By allowing detectives to upload a photo of a missing person and search through online advertisements for high-confidence matches, Traffic Jam has dramatically reduced the time it takes to locate and recover victims.
This tool has been instrumental in reuniting families and dismantling trafficking networks, significantly cutting down the investigation time from years to just a few months.

The efficacy of Traffic Jam is highlighted by numerous success stories where law enforcement officials have been able to swiftly identify and rescue trafficking victims based on matches found by the software. In one instance, a detective uploaded a photo received from a victim’s family and, within seconds, found a high-confidence match in an online advertisement. By analysing the location and time associated with the ad, the detective confirmed the identity of the missing person and facilitated a reunion with their family in a matter of days.

It not only aids in the rapid identification and recovery of human trafficking victims but also supports the building of legal cases against traffickers. Currently, Traffic Jam is utilised by security agencies across the United States, Canada, and the United Kingdom, showcasing its global impact on the fight against organised crime and human trafficking.

Organisations like the National Center for Missing & Exploited Children (NCMEC) have also embraced these innovations to enhance operations. NCMEC, a critical player in the fight against child exploitation, receives millions of tips annually about grave crimes against children, including rape, abuse, and trafficking.

A significant portion of these tips—approximately 22,000 per year—relate to missing children. Leveraging AI, NCMEC has optimised the process of preparing photographs for public dissemination and law enforcement use, which is crucial in the search for missing children. This AI application facilitates the enhancement of images by removing irrelevant backgrounds, updating clothing to reflect current appearances, and editing other individuals from the photographs to focus on the missing child.

This innovative use of AI extends beyond just the search and recovery phase. Once a child has been found and reunited with their family, the daunting task of prosecuting the perpetrators begins. Here, AI demonstrates its transformative potential in streamlining legal processes. The accumulation of evidence in cases involving child abductors or abusers is often overwhelming, encompassing a vast array of documents, communications, and digital footprints that need to be meticulously analysed to build a compelling legal case.

Traditional methods required legal teams to spend countless hours in the discovery phase, sifting through emails and attached documents to gather pertinent information. Now, AI significantly reduces this labour-intensive process, enabling quicker, more efficient preparation for trial.

Conclusion 

In conclusion, while this article primarily focuses on the application of images and convolutional neural networks (CNNs) with pre-trained models for image processing, it’s important to note that the concept of vector embeddings extends far beyond just visual data. Vector embeddings can be effectively utilised across a variety of data types, including videos, text, and more, leveraging an array of models and methodologies tailored to specific needs. Furthermore, numerous techniques exist for calculating vector distances, each offering unique advantages depending on the specific goals at hand. Ultimately, the key to unlocking the full potential of Artificial Intelligence in this context lies in carefully selecting the model and method that align most closely with your objectives, ensuring optimal outcomes in terms of accuracy and efficiency. 

The synergy between AI tools like Traffic Jam and the initiatives led by NCMEC illustrates a broader trend in the use of technology to combat public security challenges. By automating and enhancing tasks that once required extensive manual effort, AI is not only expediting the rescue and recovery of victims but also accelerating the judicial process against those responsible for such heinous crimes. This holistic approach, from identification and recovery to legal prosecution, underscores the essential role of AI in fortifying efforts against child exploitation and trafficking, promising a more effective and timely response to these urgent issues.

References 

  1. Engineer, R.T. (s/f). What are vector embeddings? Pineapple. Retrieved on March 19, 2023, from https://www.pinecone.io/learn/vector-embeddings/ 
  2. Heyer, S. (2022, April 12). How to implement image similarity using deep learning. Towards Data Science. https://towardsdatascience.com/image-similarity-with-deep-learning-c17d83068f59 
  3. (Kumon), T.Y. (2020, March 28). Similarity search and similar image search in elasticsearch. Medium. https://medium.com/@kumon/similarity-search-and-similar-image-search-in-elasticsearch-14552a8a8dea 
  4. (Kumon), T.Y. (2020, April 14). How to perform a practical similarity search with elasticsearch. Medium. https://medium.com/@kumon/how-to-realize-similarity-search-with-elasticsearch-3dd5641b9adb 
  5. Larsen, K. (2018, August 9). Marinus Analytics fights human trafficking using Amazon Rekognition.Amazon.com. Retrieved on March 10, 2023, from https://aws.amazon.com/es/blogs/machine-learning/marinus-analytics-fights-human-trafficking-using-amazon-rekognition/  
  6. (S/f-b). Amazon.com. Retrieved on March 9, 2023, from https://aws.amazon.com/es/rekognition/the-facts-on-facial-recognition-with-artificial-intelligence/ 
  7. About —. (s/f). Marinus Analytics. Retrieved on March 5, 2023, from https://www.marinusanalytics.com/about 
  8. Tech, R. (2021, August 16). Convolutional Neural Networks -Advanced image classification with AI/ML (CNN). Youtube. https://www.youtube.com/watch?v=4sWhhQwHqug 
  9. https://www.fastcompany.com/91025986/19-ceos-died-on-the-job-leaders-work-life-balance

 

daniela zarate photo

Daniela Zarate – Data Engineer

EQUINOX

what’s ai?

Discover what is AI and how it will become revolutonary in the industry

chess game seen through computer vision
English
Tau

Did you know that AI can boost productivity by 40%?