"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;
Showing posts with label OpenAI. Show all posts
Showing posts with label OpenAI. Show all posts

November 04, 2024

Prediction - 🔍 Anticipating AI's Big Shift in 2025: OpenAI’s Focus on Domain-Centric Solutions

Prediction:

OpenAI is set to shift towards domain-centric solutions, making 2025 a transformative year for AI. This transition is based on the data collected and learned from APIs serving different domains, focusing on context window improvements, reasoning patterns, and cross-modal integration. This will significantly enhance decision-making in critical sectors like FinTech and healthcare. By tackling technical challenges and integrating user feedback, these advancements will result in more powerful, tailored AI applications that will reshape entire industries.

Expanding Beyond Language Models

Today, OpenAI is primarily recognized as a leading provider of large language models, but its true capabilities extend much further. Its question-answering abilities, for instance, are exceptionally powerful and evolving rapidly. As clients integrate this technology into critical sectors like FinTech and healthcare, they will unlock new levels of context window improvements, and cross-modal integration and reasoning by adopting techniques like tree of thought, chain of thought, and graph-based approaches, enabling AI to think and deduce more effectively. Feedback from users will be pivotal in this journey, guiding organizations on how best to structure information flows and assess when to fine-tune models, use Retrieval-Augmented Generation (RAG), or determine the optimal use of short-term and long-term memory. This constant feedback loop will allow AI to achieve unprecedented levels of contextual understanding and adaptive reasoning, creating models that align more closely with complex real-world needs

"OpenAI's journey is no longer just about language—it's about thought and contextual adaptation."

Building Resilient and Adaptive Systems

These advancements will likely lead to the development of more resilient and adaptable systems. Future systems will not only enhance decision-making but also push reasoning capabilities into new territories, setting the stage for increasingly sophisticated agents and refined RAG architectures. These improved architectures are expected to reduce hallucinations, boost accuracy, and lead to products that are more responsive to real-world challenges. Overcoming issues like catastrophic forgetting, hallucinations, and knowledge manipulation will be critical, positioning these systems as robust, reliable solutions across industries. 

"Resilient, adaptive AI systems will transform decision-making and redefine industry standards."

Addressing Technical Challenges

Currently, accuracy challenges remain in areas such as domain-relevant embedding, balancing retrieval techniques against accuracy and latency, chunking methods based on usage or query types, contextualization, and routing or re-ranking processes. Yet, these elements are essential for advancing the capabilities of AI models. Despite these ambiguities, ongoing data processing and analysis are paving the way for more focused, domain-specific AI products. Within the next six to eight months, we’re likely to see a new wave of AI-driven applications, from highly specialized agents to RAG applications and APIs crafted for specific industries.

 "Technical hurdles are simply steps toward the next wave of AI-driven, domain-specific innovation."

The Transformative Potential of 2025

The year 2025 is set to be a pivotal moment in AI, marking the dawn of domain-centric solutions that will reshape how AI interacts with our world. As more industry-specific applications emerge, OpenAI’s technologies will bring powerful, tailored solutions closer to reality. 

"2025: The year AI becomes truly domain-centric, reshaping industries with precision, customized models, and highly accurate agents and RAG systems."

Keep Exploring!!!

#AI #OpenAI #DomainSpecificAI #Innovation #MachineLearning #FinTech #Healthcare #FutureOfAI


October 05, 2024

Prompt Caching Analysis

Prompt Caching Analysis

Caching is enabled automatically for prompts that are 1024 tokens or longer. 

Prompt Caching is enabled for the following models:

  • gpt-4o (excludes gpt-4o-2024-05-13 and chatgpt-4o-latest)
  • gpt-4o-mini
  • o1-preview
  • o1-mini

Usage Guidelines

1. Place static or frequently reused content at the beginning of prompts: This helps ensure better cache efficiency by keeping dynamic data towards the end of the prompt.

2. Maintain consistent usage patterns: Prompts that aren't used regularly are automatically removed from the cache. To prevent cache evictions, maintain consistent usage of prompts.

3. Monitor key metrics: Regularly track cache hit rates, latency, and the proportion of cached tokens. Use these insights to fine-tune your caching strategy and maximize performance.

Ref - Link1, Link2

Keep Exploring!!!


April 27, 2024

OpenAI - Prompt King - Prompt Usage Patterns

The interesting thing about OpenAI is the prompt history. The information below is a gold mine:

  • Commonly used prompts and their responses.
  • Ranking responses based on user feedback.
  • Distribution of prompts across different domains. (Health, History, News, Tech)
  • Caching of prompts and answers for quicker access.
  • Low latency approach to handling cache versus read operations.
  • Asynchronous processes involved in domain detection, intent detection, and retrieval.
  • Various combinations of indexes are used to optimize searches using golden data, cached data, summary data, and raw data.
Keep Exploring!!!

November 07, 2023

OpenAI’s first-ever developer conference - Key highlights

  • GPT’s knowledge cutoff was updated to April 2023 
  • Users will be able to fine-tune GPT-4
  • OpenAI will defend any copyright infringement claims against its users
  • OpenAI releases its first text2Speech model
  • API access to DALL-E 3, GPT-4 (Turbo and Vision)
  • GPT-4 Turbo will cost 2.75x cheaper on average
  • GPT-4 Turbo 128k context window
Keep Exploring!!!


May 27, 2023

State of GPT

Brilliant talk on LLMs

  • Emerging Recipe to train

  • Pre-training - compile time of 99%, internet scale dataset
  • Data mixture crawl, high-quality data, mixed up, sampled in proportion

  • Tokenization
  • Text to int representation
  • Similar to embedding, word2vec we discuss

  • Params
  • Token size
  • predict the next integer sequence
  • 1.4 Trillion Tokens

  • hyper parms

  • Pretrain - Tokens to Data batches


  • Probability distribution of what comes next

  • Low loss higher correct probability
  • Learn powerful general representations


  • LLM + Few short learning is practice
  • Transformer forced to multitask in next token
  • Forced to understand text, causes
  • Better than finetune / prompt them


  • Base models are not systems
  • It completes what it fills a document

  • Not very reliable
  • Supervised finetuning
  • Small high-quality datasets
  • Human contractors
  • Prompt-response collection
  • Swapping out the training set
  • QnA - low quantity - high quality
  • People follow the structure and create responses

  • Reward read out tokes
  • Quality of each completion
  • Reformulate loss function with ground truth

  • Reinforcement learning with respect to reward model
  • Reinforce for higher probabilities
  • base model
  • SFT model - supervised fine-tuning (SFT)
  • RM model - reward model (RM) training
  • RL model - reinforcement learning 

  • Model Ranking

  • Applications


  • Template of article

  • Time spent on each token
  • Token simulators
  • Imitate next token
  • Fact based knowledge/parameters
  • Large working memory
  • Transformer direct access to memory
  • Chain of thought
  • Prompt it will revisit


  • Slow and fast reasoning
  • Step by step vs one-step process
  • Tree search algorithm

  • Chain / Agents
  • General techniques
  • The sequence of thought/observation


  • Ask for good performance
  • You are an expert on this Topic
  • In data distribution of sci-fi



  • Tell a prompt not good at
  • Use a calculator, Teach LLM to use tools
  • Retrieval only vs memory only
  • Reteval Augmented models



  • Constrained prompting
  • Forcing templates
  • Output as json


  • base model clamped

  • Finetuning
  • Human contractors





  • Recommendations


  • Use cases


Keep Exploring!!!

May 18, 2023

Age of Nice UI

designer microsoft

instagram post for water purifier


THE AI DESIGN TOOL FOR BRANDED CONTENT

befunky

Photo Editing and Graphic Design Made for Everyone


booth.ai

Keep Exploring!!!

April 11, 2023

PDF Question answering with OpenAI Text Embeddings

My notes from the video tutorial Ref - Link 

Key Steps

  • Load Pdf Documents
  • OpenAI embeddings
  • Query Stanford AI index report

Detailed Steps

  • OpenAI API key
  • Mount gdrive
  • Read pdf documents, extract text
  • Token size 1000 characters
  • Chunk overlaps 200 character
  • import question/answer from lang-chain

Questions (Find Similar text)

  • What are the key vision models mentioned
  • How is vision maturity compared to text





Keep Exploring!!!

  1. A Document AI Package
  2. Document Image Skew Estimation
  3. Knowledge Retrieval Architecture for LLM’s (2023)


January 10, 2023

GPT as Doctor

 GPT as Doctor 

Question #1 - prescribe me a tablet for fever in 20 words 

Ibuprofen, Acetaminophen, or Aspirin are all good choices for treating fever.

Question #2 - prescribe me a tablet for gastric issue in 20 words 

Omeprazole 20mg tablet once daily before meals.

Question #3 - prescribe me a tablet for cholestrol in 20 words 

Atorvastatin, a cholesterol-lowering medication, is recommended.

Question #4 - prescribe me a tablet for chest burn in 20 words 

Omeprazole 20mg tablet twice daily for relief of chest burn.

Question #5 - prescribe me a tablet for stomach worm in 20 words 

Albendazole 400mg tablet, taken twice daily for three days.

Question #6 - prescribe me a tablet for headache in 20 words 

Ibuprofen 200mg tablet is recommended for headache relief.

Question #7 - prescribe me a tablet for giddiness in 20 words 

The tablet prescribed is meclizine. It helps reduce giddiness and motion sickness.

Keep Querying!!!

January 08, 2023

ChatGPT Notes - Tech Perspectives

Paper - Link

Ref Link 

  • Label output of GPT
  • Apply human feedback
  • SFT - Supervised Finetune model
  • Rank outputs

Label Approach

  • Plain: We simply ask the labelers to come up with an arbitrary task, while ensuring thetasks had sufficient diversity.
  • Few-shot: We ask the labelers to come up with an instruction, and multiple query/responsepairs for that instruction.
  • User-based: We had a number of use cases stated in waitlist applications to the OpenAIAPI. We asked labelers to come up with prompts corresponding to these use cases.

  • sequence of indices feeds into a Transformer
  • probability distribution over the next index in the sequence comes out
  • clever with batching (both across examples and over sequence length) for efficiency.
Key params
  • GPT-1-like: 12 layers, 12 heads, d_model 768 (125M)
  • GPT-3: 96 layers, 96 heads, with d_model of 12,288 (175B parameters).
  • feedforward layer four times the size of the bottleneck layer, dff = 4 ∗ dmodel
  • GPT refers to a family of models which includes ChatGPT. text-davinci-003 is the model trained almost the same way as ChatGPT except it is not tuned for dialogue. We can use text-davinci-003 through OpenAI api today. There is a cost based on usage we need to factor when building applications.
  • This could be a combination of factors - one the attention mechanism helps a model to focus on the appropriate parts of the sentence for context. Also the inclusion of code in training corpus may have a role in its ability to remember the tokens mentioned in the beginning of a dialog when answering a question that comes much later. For instance code completion requires model to complete a braces that marks end of a code block or remember to use a global variable that was mentioned earlier.
  • There is no middleware - the entire context is present in the input token sequence that could be as long as 2048–4096 tokens
Ref - Link



  • The encoder takes the input and encodes it into a fixed-length vector. 
  • The decoder takes that vector and decodes it into the output sequence. 
  • Transformers use multi-headed attention, which is a parallel computation of a specific attention function called scaled dot-product attention. 

  • GPT Competitors
  • PEER by Meta AI
  • LaMDA by Google AI 
  • PaLM by Google AI
  • Computing the Unnormalized Attention Weights
  • Computing the Attention Scores
  • Multi-Head Attention
  • Generative: A GPT generates text.
  • Pre-trained: A GPT is trained on lots of text from books, the internet, etc ...
  • Transformer: A GPT is a decoder-only transformer neural network
At a high level, the GPT architecture has three sections:
  • Text + positional embeddings
  • A transformer decoder stack
  • A projection to vocab step
  • Take a bunch of text blocks and feed them to the OpenAI embeddings API
  • Find the most similar vectors among my notes
Good Read - GAN 
  • 𝐈𝐦𝐩𝐫𝐨𝐯𝐞 𝐩𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐯𝐢𝐭𝐲 𝐚𝐧𝐝 𝐩𝐫𝐨𝐜𝐞𝐬𝐬 𝐞𝐟𝐟𝐢𝐜𝐢𝐞𝐧𝐜𝐲.
  • 𝐎𝐩𝐭𝐢𝐦𝐢𝐳𝐞 𝐯𝐚𝐥𝐮𝐞 𝐜𝐡𝐚𝐢𝐧𝐬.
  • 𝐑𝐞𝐝𝐞𝐟𝐢𝐧𝐞 𝐭𝐡𝐞 𝐞𝐧𝐭𝐢𝐫𝐞 𝐞𝐜𝐨𝐬𝐲𝐬𝐭𝐞𝐦.
Keep Exploring!!!

January 06, 2023

GPT Text Examples

 


Keep Exploring!!!