Friday, May 26, 2023

Course Summary - DeepLearning.AI - ChatGPT Prompt Engineering for Developers

  • TL;DR

    • Enjoyed learning about the emerging field of Prompt Engineering via this course taught by Andrew Ng ( DeepLearning.AI ) and Isa Fulford ( OpenAI ).

    ----------------------------------------------------------------------------------------------------------

      ----------------------------------------------------------------------------------------------------------

        • Chapters

          • Introduction
          • Guidelines
          • Iterative
          • Summarizing
          • Inferring

            • Extracting Key topic(s)
            • Extracting Sentiment, and Sentiment score(s)
            • Executing multiple task(s) with a single prompt

          • Transforming

            • Language translation
            • Inferring a language
            • Multiple translations
            • Universal translator
              • Multiple input and output language(s) are supported
            • Tone transformation
              • Make some text more / less compelling
              • Make some text more / less formal
            • Translate across format(s)
              • For example JSON to HTML
            • Spellcheck / Grammar check

          • Expanding

            • Temperature input parameter can be used to control the level of randomness of the response.
              • For more 'production' grade applications, it is recommended to set this to 0.

          • Chatbot
            • In this mode we can setup the context for a conversation using a system prompt, and carry it forward.

            • Model(s) are stateless, and for carrying out a conversation, all prior context must be provided at the time of the interaction.

            • In a few line(s) of a Code, a full-blown Pizza Order Entry Chatbot was written, which accurately interacted with the user and then captured the order.

          • Conclusion

          ----------------------------------------------------------------------------------------------------------

            • Important Terms

              • Zero-Shot Learning

              ----------------------------------------------------------------------------------------------------------


                • Key Learning(s)

                  • With GPT it is possible to have a single model that performs multiple language task(s), in a matter of a few minute(s). 
                  • Prompt Engineering
                    • Writing clear and specific instructions is important.
                    • OPEN AI API can be used for programmatically interfacing with the GPT model(s).
                    • Delimiters are important to identify different parts of your prompt.
                    • Output(s) can be easily modified to different format(s).
                      • JSON Output can be very helpful for ingestion into program(s).
                  • Learnt following interesting Python Package(s):  
                    • Redline(s)
                      • It can be used to programmatically execute diff(s) between two pieces of text, and display it in a visually clean manner. 
                    • Panel
                      • Can be used to rapidly spin-up user interface(s), for example, within Jupyter Notebooks. 

                  ----------------------------------------------------------------------------------------------------------

                Monday, May 22, 2023

                Restarting Android Development

                •  Off-late, I have developed some level of interest in getting back into the Mobile development space. 
                • Just like when I started originally, I am starting it off with Android development:
                  • This is primarily driven from the relatively open nature of Android development, as well as the ready availability of hardware for testing. 
                • My short-term goals are to be able to build, test and deploy some applications which are able to perform on-Device Machine Learning tasks. 
                • I also want to understand the impact of Quantization, and mobile-optimization techniques on real-world performance. 

                More to come !

                Tuesday, October 26, 2021

                Wednesday, December 30, 2020

                Time management ( especially at work )

                A collection of thoughts around time management and a recipe for achieving your goals, especially as applied to work. A 'light' / less structured version of the same can be applied even outside of work. It is essentially the Pomodoro technique, however, I did not know that this technique has a proper name when I started using it a few years ago.

                • Every week, I try to plan out my next week and wrap up this planning activity by Friday of the preceding week. 
                  • This allows me to be better prepared and more deterministic about my next week.
                    • Note that distractions, and high priority events will always happen, but other than that, it allows me to make sure that my time allocations are aligned with what I set out to achieve.
                • I assume that you already have a list of short term and long term goals and deliverables that you want to accomplish. 
                  • If you don't, then that would be the first step.
                • Ensure that you carve out time, via Calendar-based events for all the different goals that you have decided on a short term and long term basis. 
                  • This is probably the most important step, because this allows you to evaluate the importance of each goal against the time you have available. In other words, in this step, you are putting your money ( attention ), where your mouth ( time ) is. It also allows you to prioritize your goals in a more concrete manner, rather than amorphously thinking, I will accomplish xyz. If you are unwilling to carve out the time for your goal, then the goal is probably not that important to begin with !
                  • The time you carve out for each goal, should be proportional to the importance of that goal.
                  • Ensure that you have proper calendar events for those specific carved out times. 
                    • Make sure that you carve out the time as 'free' on your Calendar, so you continue to be available to your team if a high priority issue comes up and if a meeting needs to be setup at the last moment for a discussion.
                  • Make sure that the duration of such chunks of time matches the stretch of time you can focus well. In other words, if you can focus continuously and be productive for x minutes, then make sure that the chunk is of duration x minutes.
                  • Keep a short mental break of say 5 minutes between such chunks to allow you to context-switch to the next task / goal.
                    • Sometimes, I did not keep this short gap and it made context-switching pretty difficult, and also led to mental exhaustion and potential burn out.
                • For any meetings that you are an organizer of, make sure that the agenda is clear and well-defined. 
                  • Also,  have an expectation around which questions to anticipate and also from whom, which inputs will be needed. 
                  • If the topic / subject area could be big, it might make sense to meet with a smaller group ahead of time, to clarify an issue. 
                • Make sure that all the meetings you are a part of, have a well-defined agenda / goal. 
                  • If not then solicit feedback from the organizer about the goal for the meeting. This ensures that you are aware of what the expectations are for the meeting, and how specifically will you contribute to that meeting.
                • For One:One meetings setup some dedicated preparation time and follow up time
                  • For One:One meetings, setup some dedicated preparation time, in which you call out the high level talking points in terms of what you want to present, as well as discuss / ask.
                  • Additionally, setup some dedicated time after the meeting to follow up on the next steps / tasks that came out as a result of the meeting
                    • Some of the follow-up items might be high priority, and it is best to get those addressed then and there, or the items might be lower priority in which case those could be deferred to a suitable date.


                Saturday, February 23, 2019

                New MOOC on Self-Driving Cars

                If you are interested in the self-driving car ( / Autonomous Vehicles - AV ) space, and are looking for a more in-depth look at the various technical and non-technical challenges that need to be resolved before the self-driving cars can be common place in our society, then Coursera has launched a new course, which is available here

                It is structured as a Teachout, which is a format that encourages posing open ended question(s), soliciting potential approach(es) to solutions from student(s) and a learning format that encourages learning as much via peer interaction, along with the standard instructor-student interaction. 

                Self Driving Cars : Level(s) of Autonomy

                Many times in the self-driving car space, you will come across the term 'level(s) of autonomy'. These are defined by SAE ( Society of Automotive Engineers ). The snippet below is sourced from here


                • Level 0 – No Driving Automation = The performance by the driver of the entire DDT. Basically, systems under this level are found in conventional automobiles. 
                • Level 1 – Driver Assistance = A driving automation system characterized by the sustained and ODD-specific execution of either the lateral or the longitudinal vehicle motion control subtask of the DDT. Level 1 does not include the execution of these subtasks simultaneously. It is also expected that the driver performs the remainder of the DDT. 
                • Level 2 – Partial Driving Automation = Similar to Level 1, but characterized by both the lateral and longitudinal vehicle motion control subtasks of the DDT with the expectation that the driver completes the object and event detection and response (OEDR) subtask and supervises the driving automation system. 
                • Level 3 – Conditional Driving Automation = The sustained and ODD-specific performance by an ADS of the entire DDT, with the expectation that the human driver will be ready to respond to a request to intervene when issued by the ADS
                • Level 4 – High Driving Automation = Sustained and ODD-specific ADS performance of the entire DDT is carried out without any expectation that a user will respond to a request to intervene
                • Level 5 – Full Driving Automation = Sustained and unconditional performance by an ADS of the entire DDT without any expectation that a user will respond to a request to intervene. Please note that this performance, since it has no conditions to function, is not ODD-specific.

                Image from the link here