Scraps from various sources and my own writings on Digital, Artificial Intelligence, Disruption, Agile, Scrum, Kanban, Scaled Agile, XP, TDD, FDD, DevOps, Design Thinking, etc.
Page Hits
Thursday, May 30, 2024
Wednesday, May 29, 2024
Python Programming
- List vs Tuple
- List
Mutable: Can be modified after creation (elements can be added, removed, or changed).
Ordered: Maintains the order of elements.
Indexable: Allows access to elements by their index.
Dynamic Size: Can grow or shrink as needed.
Syntax: Defined with square brackets, e.g., [1, 2, 3].
Methods: Extensive set of methods for modification and querying (e.g., append(), extend(), remove(), pop(), sort()).
my_list = [1, 2, 3]
my_list.append(4) # [1, 2, 3, 4]
my_list[1] = 5 # [1, 5, 3, 4]
- Tuple
Immutable: Cannot be modified after creation.
Ordered: Maintains the order of elements.
Indexable: Allows access to elements by their index.
Fixed Size: The size is fixed upon creation.
Syntax: Defined with parentheses, e.g., (1, 2, 3).
Methods: Limited set of methods mainly for querying (e.g., count(), index()).
Tuesday, May 28, 2024
Business Analysis Fundamentals
- You'll facilitate communication between different stakeholders, business users, IT teams and management,
- Organizing meetings,
- Gathering requirements, and ensuring everyone is aligned,
- Driving projects forward with clarity and efficiency.
- Gather and document business requirements for projects or initiatives,
- Conducting interviews, surveys, or workshops with stakeholders to understand their needs and priorities,
- Translating these requirements into actionable plans for development teams.
- Testing and validation, you'll assist with user acceptance testing or UAT, ensuring that new software meets end users needs before deployment.
- Support project managers in coordinating and tracking project activities, milestones and timelines,
- Updating project plans, monitoring progress, and communicating status updates to stakeholders.
- Participate in process improvement initiatives, identifying areas for optimization, and proposing solutions to streamline operations. From suggesting workflow improvements to enhancing inventory management processes, your insights will drive continuous improvement within your organization.
- Problem identification / business needs / root cause
- Stakeholder management
- Risk management
- Process analysis and process improvement
- Data analysis
- Gathering requirements and documenting them
- Solution evaluation and recommendations
- Testing and validation
- Implementation support
- Continuous improvement
Monday, May 27, 2024
Introduction to Generative AI - Andrew NG
- AI is a general purpose technology - it's useful for a lot of things. (Like electricity)
- Internet is another general purpose technology.
- Use as brainstorming partner
- For writing - example, write a press release.
- Translation - example translate the following into Hindi / formal Hindi / formal spoken Hindi
- Translate text into Pirate English for teseting purposes.
- Proofreading
- Summarizing a long article.
- Summarizing call centre conversations. (Record --> Run Phone calls --> Speech Recognition --> Long Test Transcripts --> LLM -- Summarise converstaion --> Generate short summary --> spot issues or trends (Manager)
- Specialized chatbots
- Customer service chatbot
- Trip planning chatbot
- Advise bots - career coaching, cooking a meal, etc.
- Some can ACT if sufficiently empowered.
['The mochi is excellent!',
'Best soup dumplings I have ever eaten.',
'Not worth the 3 month wait for a reservation.',
'The colorful tablecloths made me smile!',
'The pasta was cold.']
3. Write a code to classify the above reviews as poistive or negative.
for review in all_reviews:
prompt = f'''
Classify the following review
as having either a positive or
negative sentiment. State your answer
as a single word, either "positive" or
"negative":
{review}
'''
response = llm_response(prompt)
all_sentiments.append(response)
all_sentiments
Output will be ['positive', 'positive', 'negative', 'positive', 'negative']
4. Write code to count the number of positive and number of negative reviews.
num_positive = 0
num_negative = 0
for sentiment in all_sentiments:
if sentiment == 'positive':
num_positive += 1
elif sentiment == 'negative':
num_negative += 1
print(f"There are {num_positive} positive and {num_negative} negative reviews.")
Output is: There are 3 positive and 2 negative reviews.
Lifecycle of a Generative AI Project
The above output is wrong because tonkotsu ramen is pork soup, and the above response is not considered positive.
Now feedback to the system to improve
Tools to improve performance
- Prompting is a higly empirical process
- Idea -- Prompt -- LLM Response -- Tweak Idea and the cycle repeats
- RAG - Retrieval Augmented Generation (RAG)
- Give LLM access to external data sources.
- Fine tune models
- Adapt LLMs to your task.
- Pretrain models
- Train LLMs from scratch
Above, where the calorific value is asked, you can go over to RAG.
How much do LLMs Cost?
A Token is a word or a sub part of a word.
300 words == 400 tokens
number of tokens is loosely about number of words.
Retrieval Augment Generation (RAG)
RAG will refer to additional inputs from your company to answer the question above.
This is called Retrieval Augmented Generation or RAG, because we're going to generate an answer to this, but we're going to augment how we generate text by retrieving the relevant context or the relevant information and augmenting the prompt with that additional text.
> AI Bots that allow you to chat with PDFs
> AIs that allow you to get answers for questions on website's articles
> New form of search on web
LLM as a Reasoning Engine
Pre-training and Fine Tuning AI
> To carry out a task that is difficult to define in a prompt.
DSPM, Data Security Posture Management, Data Observability
DATA SECURITY POSTURE MANAGEMENT DSPM, or Data Security Posture Management, is a practice that involves assessing and managing the security ...