Full Cycle Cognitive Development – Part 2 – Agile Development


In part 1 of this series, Full Cycle Cognitive Development – Part 1 – Business Concepts, I talked about some of the simple organizational issues and concepts that are important to know when doing cognitive development.  I am an ex-developer, so this second part is a bit closer to my heart.  In this blog we’ll look at some of the basic “blocking and tackling” that developers need to do as part of a successful cognitive development effort.

Use Agile development methods

Most software development teams use some sort of Agile methodology today.  It’s not perfect, and there are “shades” of Agile.  Some teams are able to fully embrace Agile development methods, but others cannot due to business or regulatory constraints, or safety concerns.  There are thousands of articles, papers and blog posts about Agile development – and everyone has sightly different approaches and opinions, so I won’t go into great depth here.

What I will say is that the development of cognitive solutions is often a very fluid process.  IBM (as well as other vendors) often come out with new cognitive capabilities which you will need to assess and evaluate.  Don’t try to lay out a full blown project plan without acknowledging that the changes in this area are going to be constant.  New capabilities may emerge that can change the way your solution is constructed, or may even change the original scope and goal of your project.

Because of this constant evolution and change in the capabilities of cognitive services, it is essential that you embrace the idea of sprint planning, and the basic philosophy of Agile development.  If you find yourself beginning to produce Gantt charts, detailed requirements documents, and calling out delivery dates 9 months in the future, you’re probably moving in the wrong direction.  Focus on user stories, sprints, and the delivery of incremental value.  Keep in mind that your business goals probably won’t change too much, but the technological path that you take to achieve these goals will definitely change over time.

It’s All About the Data (Science)

Another reason Agile is attractive for cognitive development efforts is because cognitive capabilities sometimes require training.  Some capabilities come pre-trained, where the vendor has already spent the time and effort to train and model the cognitive service.  Others will require you to train your service, teaching it how to react and respond.

These trained services will require data in order to be trained, and the accuracy of the trained service will need to be assessed over time.  This training is a bit non-deterministic, so it could take 2 sprints, or it could take 10 sprints, to get your service adequately trained.  James Ravenscroft has some excellent blog posts about training your cognitive service, and then testing it out, which I suggest you read.  If you have the time, read some of the blog posts on Cognitive System Testing by Andrew Freed – he’s really good and he knows the subject area quite well.  He has a great post on Reaching Peak Cognitive Performance that I consider a “must read”.  Another good source on this is Marc Nehme, who has some good guidance on training the IBM Watson services.  (Author’s note: I work for IBM on Watson, so most of my links/references will focus on the Watson technology.  The basic concepts here should hold for most AI vendor technologies.  If you know of other good sources, please reference them in the comments to this blog post.)

One common area of confusion is around the testing of cognitive services and trained systems.  This is NOT traditional application testing.  Traditional applications are deterministic, if you do “A”, they will respond with “B”.  Cognitive systems (and AI systems in general) work with probabilities – and they are imperfect just like you and me.  So testing requires a bit of a different mindset with cognitive systems.  With cognitive systems, 100% accuracy isn’t realistic.  If all of this sounds “just plain wrong” to you, then I strongly encourage you to read the testing links in the previous paragraph.  Those folks explain it much better than I could.

All of this training and testing rely on one thing – data.  It sounds simple, but there is a science to it – which is why we have data scientists and the discipline of data science.  A cognitive system is only as good as it’s training, and it’s training is only as good as the data being used to train the system.  My team has worked with hundreds of organizations looking to build cognitive applications, and my architects always seem to come back to a single point when assessing the prospects for some new effort – “How good is their data?”.  Data is critical.  Data is king.

So how do you get your hands on the data, and once you do, what should you do with it?  My advice is to get a good data scientist (or multiple data scientists) to help you.  They know how to get information and intelligence from both open source data sets, as well as your own private data sets.  You can also check out the IBM Data Science Experience, which has all kinds of resources that you can use.  The site has articles, some sample data sets and notebooks, tutorials and more.  It can be a great place for you to begin to understand how you can think about your data, and figure out how to use this knowledge to help drive a cognitive application.

The key to keep in mind here is that as your learn about the cognitive capabilities that you have at your disposal, and as you train these services, the feedback that you get can cause you to change your focus and schedule.  Data sources may change, training may take longer than expected, additional data may have to be obtained, and existing data may need to be annotated.  Stay disciplined in doing sprint demos and backlog grooming.  These activities will allow you to show positive progress and keep you aligned with your stakeholders.

Use tools

This is where a lot of Agile people get confused.  Agile teams don’t HATE tools, they just don’t use tools unless doing so adds value.  The Agile Manifesto states that, “We value individuals and interactions over processes and tools”.  It doesn’t say, “We hate all tools”.  When doing cognitive development, you will need to rely on tools to make your job easier (valuing the time and energy of the individual), and to show your stakeholders what you are doing (helping keep interactions based on reality).

So what kinds of tools are useful here?  Let’s cover a few of the different areas.

Agile Tools

There are hundreds of different Agile tools that you can use to help keep your cognitive development organized and focused.  You can use things like the IBM Jazz products, GitHub/ZenHub, VersionOne, Atlassian and others.  Some are open source, some are vendor provided.  Developer communities can get into long arguments about which tools are better.  Don’t waste a lot of time and effort doing tool evaluations, just choose the tools that your team will work the best with.  The tools that you select should provide a clear mechanism for your development team to communicate status, ask for help, indicate issues and problems, and allow you the ability to quickly find and focus on problems.  They should allow your team to do this without significant additional effort, and they should be something that is as unobtrusive as possible.  In other words, they should value the individuals, and not the process.

Whatever tools you choose should have some transparency and the ability to show team progress, goals, and challenges on a DASHBOARD.  If you’re a long time reader of my blog, you know that I find dashboards to be helpful not only in communication of status and issues, but they help teams become transparent, and allow you to spend less time arguing over who’s version of reality is correct.  The best Agile development teams that I have seen have been transparent, almost painfully so.

Cognitive and Data Tooling

Many of the different vendors of cognitive capabilities also provide some kind of tooling or scripts that help to make their services easier to use.  These range from simple tools that can be used to break up training and test data, to some more sophisticated data annotation tools (like Watson Knowledge Studio) and analytics capabilities.  Just like the Agile tools, some of these tools are open source and you can just grab the code from GitHub repositories, other things are vendor provided, and some cost money.

Data Tools

Often cognitive services will need data in a particular format, XML or JSON, before they can use the data.  Save yourself some time and trouble and just do a simple Google search for simple data translation tools like these.  More complex tools may require licensing or some cost.  You should also spend some time with your data scientist (you did get one, right?).

Make sure that your data scientists have the tools that they need to be effective.  It’s also a good idea to have your data scientists using the same tools – that way they can begin to reuse certain methods and techniques, and begin to build up a solid data science discipline in your organization.  You wouldn’t want your developers all working with different IDE’s, compilers, languages, on an ad-hoc basis, would you?  It would be total chaos.  The same thing holds true for your data scientists – be nice to them and they will reward you with insights and business intelligence that will amaze you.

Some of the more common tools that data scientists use include things like Python (along with the Pandas, SciPy and NumPy modules), Jupyter notebooks, R, D3 (D3.js), Spark, and TensorFlow.  Some of these are programming languages well suited to data manipulation and analysis, some are data visualization frameworks, and some are just data driven technologies.

Software Tools

For those of you who know me, this is an area near and dear to my heart.  We’ve already discussed Agile tools, but what about other software tools?  What else do you you need to be aware of?

You need development tools, but before you go and get some, keep in mind that most cognitive technologies depend on (or are deployed on) cloud infrastructure.  Keep in mind that the tools that you choose will need to work in a cloud environment.  If you’re working with Watson, then you will need to provision and access the Watson services on the IBM Bluemix cloud.  Do you want your application to live in this environment as well?  Or are you going to host your application on your own infrastructure, and make calls out to the Watson services?  Where is your data going to live?  Do you have private data being used by the cognitive application?  Are you using two types of data, with some data used for conversational and user context, and another set used for training your cognitive service?

With cloud environments, this can all get overwhelming pretty quickly.  So the first thing I would suggest is a good drawing tool.  Pick what you want, Visio, Mural, PowerPoint (don’t shoot me – some of you actually use it for this kind of thing), some architecture tool like Archi, or something else.  You just need to have the ability to easily express in pictures what your cognitive application is going to look like from a technology perspective.  A lot of people will want to know about specific pieces of your application (security, deployment, etc.), and you will want to communicate clearly with them.

Next you need to be able to actually write code and that means you’ll need some sort of IDE for your developers.  There is a lot out there to choose from, and you probably already have something that you are using.  If it’s not broke – then don’t fix it, and just let your developers use what they are comfortable with.  Some of the more popular IDE’s work for more than just one language, and that is probably a direction I would go in.  You can use something like Eclipse, Intellij, Xcode, Atom, Komodo, or even the Orion IDE that is part of Jazz Hub (more on that in a little bit).  Some of these are open source, some are vendor tools that you’ll need to pay for.  Find what gives your developers the most value, and go with it.  Just make sure that whatever you choose has some way to integrate information back to your dashboards (remember those from the section on Agile tools?).

You also need to consider Software Configuration Management (SCM) tools, so you can develop code without having developers stepping all over each other.  There are a LOT of different SCM tools in the market, and if your company is normal you probably already use multiple different SCM tools.  Developers can get “excited” about their favorite SCM tools – they love some and hate others.  You can select from things like the Jazz tools, Git or GitHub, Subversion, Razor, CVS and others.  Like all of the other tools I’ve mentioned, some of these are open source, some are vendor tools that you’ll need to pay for.  Recently I have seen a lot of work being done by my customers on either GitHub or GitHub Enterprise (think of it as a “private”GitHub).  If you’re using GitHub, then you might want to look at ZenHub for Agile tooling capabilities.  My own team has been using GitHub Enterprise with ZenHub Enterprise, which gives us SCM and Agile tool capabilities (but no real dashboarding).  I like it because it’s all handled out in the “cloud” somewhere, and it integrates with Jazz Hub for a cloud based, seamless, deployment to Bluemix.  We still need to use another technology for our dashboards, but it allows us to be flexible, responsive, and get up and going on any project pretty quickly.

I did mention Jazz Hub in my list of potential IDE’s.  That is a qualified recommendation, and it’s a bit different.  As far as an IDE is concerned, it’s a bit limited in it’s capabilities.  It does have some really cool features though, which is why I mention it.  It has some Agile tooling and dashboarding capabilities built into it, which you can access by hitting the “Track & Plan” button in your project.  You also have an integrated GitHub repository for your SCM needs.  Finally, it also has some built in DevOps tooling (more on that in my next post).  In my work with it I have found it sufficient for small projects, and it really simplifies things having everything Cloud based (IDE, SCM, Agile tools, deployment to Bluemix, etc.).  Give it a look (it’s free), and see if it works for some of your projects.

I can hear people already clamoring for sustainable software development, with DevOps tools and delivery pipelines.  Don’t worry, I haven’t forgotten about them – the topic is too big to approach here.  That is the subject of Part 3 of this series, Full Cycle Cognitive Development – Part 3 – Do It Again.

Get Started!

Now you should have most, if not all, of your supporting infrastructure in place.  Now you need to get to work actually creating something useful.  Less talk, more action!

Start by getting your epics and user stories collected.  They won’t be perfect, and they will change over time, but you need to get started.  Assemble your team, get them familiar with their working environment, and begin to do some sprint planning and prioritization of user stories.  Let your teams get started and begin to find a working rhythm, and have the whole team monitor the progress of their efforts on your dashboards.

You are going to make mistakes – be honest about it and accept that fact.  Your processes and tools will change as your team begins to add things to the process to ensure quality, and as they remove things from the process that add little or no value.  Your cognitive team is not only doing software development, they are doing cognitive system training, and that those two things are quite different.  You need to be flexible and understand that what works for other organizations might work for your organization, or it might not.  Don’t believe everything that you read (even this blog!), believe what you SEE and what you MEASURE in your own teams.


Cognitive development is new for most organizations.  It is NOT your typical software development effort, although it shares many of the same concepts and metrics.  Keep in mind that cognitive systems are trained, not programmed.  If you’re doing cognitive development, people are going to be watching you – it’s just the way that things are.  So spare yourself and your team the agony of endless status meetings by being transparent, and show your progress and struggles on a dashboard.  Embrace Agile development concepts, and don’t be afraid to replay, reprioritize, and adjust as time (and sprints) moves on.  Being transparent will give your management team some comfort with all of the change that cognitive development will bring, and will allow you to quickly introduce new methodology, metrics and concepts.

In part 3 of this series I will explore how you make cognitive development repeatable and part of your development culture, and the important role of DevOps concepts in making this a reality.

Full Cycle Cognitive Development – Part 1 – Business Concepts


I’ve been working with IBM Watson and cognitive computing for a while now, and I have seen a lot of really amazing and innovative applications of cognitive technology by our customers.  Customers take combinations of the cognitive capabilities of Watson, and combine them to provide capabilities, insight, and intelligence that is unique and game changing.

Often these efforts begin as small prototypes, showing the potential of the application being developed.  They are bare boned, lack an attractive UI, and just show the promise of what could potentially be a new and powerful capability.  They have no security, and don’t address any of the other non-functional requirements of any enterprise application.

As these prototypes evolve, they are used to generate interest in further funding their development – and this is where things begin to get tricky.  Up to this point, the prototype has displayed great promise and raw capabilities with relatively little effort.  The development team is either very small, or limited to people doing this in their “spare time”.  Getting the thing 50% or 75% completed has taken a relatively short amount of time, cost very little, and has been done through the efforts of a small group of people.

Once the enterprise concerns need to be addressed, the costs and effort begin to balloon.  Adding fully functional security to a project requires effort, as does the need to build a scalable and robust architecture.  Management begins to think that the team has gotten dumb, as the “last 25%” of a project takes twice as long and costs twice as much as anticipated.  It is at this point that many organizations abandon their cognitive efforts.

Some organizations do continue their efforts, and when they do, they are rewarded with a new cognitive capability that provides them with benefits that they cannot get with their existing tools and systems.  So what makes these organizations successful, while others are not?  I’ll explore this a bit in this series of blog posts, and discuss what you can do to improve your chances for success.

Getting Some Terminology Straight

This post is focusing on the organizational and business concerns that you will encounter in the development of a cognitive application.  One of the largest sources of confusion between the business people and the technical staff is in the terminology used to describe the maturity of a cognitive application.  Terms like “prototype”, “MVP”, “pilot”, “proof of concept” (or POC), and “production” get thrown around, and there are different understandings of what they mean.

I asked a bunch of Watson architects for their definition of these terms, and we all had some differences of opinion.  So we discussed it, argued a little bit, and generally hashed it out.  We ended up with this progression of application maturity:

Demonstration (Mockup) – this is exploring technology for understanding, developing, and managing requirements.  This is something that is done so people can say, “Now I see what you mean…”

Proof Of Concept (POC) – this is a collection of services and code that show what cognitive services can do, with a functional but not fully polished UI, that show the basics of a technology.  It helps determine the feasibility of implementing some cognitive capability, and focuses on the highest risk area.  It is meant to a focus on figuring out what you don’t know and can only figure out by putting code on machine (and in the case of Watson content, by pushing data through our APIs).  The POC is not really polished, and could be completely thrown out (depending on what you learn) before moving to the next phase.

Prototype – This has a more fleshed out architecture than a POC, consider it a big brother to a POC.  This is a simple collection of services and code that show the basics of a technology, and the beginning of an architecture for a product.  It should handle most of the primary use cases for a product. Still not fully polished, it could be considered a bit “rough around the edges”.

Minimum Viable Product (MVP) – this is the next stage. A collection of services and code that provide a fully functional use case, with a “happy path” and some alternative paths fully realized. It can stand on it’s own. A fully functional UI, but potentially a limited set of functionality and capabilities, that may only serve a subset of the intended user population. The core of the architecture has been completed, and there may be extension points for anticipated future enhancements.

Pilot – an initial release of the MVP application to a small subset of the anticipated user community. Used to help solicit end user feedback and to allow for the “hardening” of non-functional pieces of the architecture (performance, scalability, etc.).  It’s where you learn to operationalize the application (even though you should have been doing this all along).

Production – A production system is the full system suitable for use by the complete target user group with the level of robustness and functional and non-functional capabilities that meets stakeholder expectations.

You might agree with this progression, or you may think we’re wrong.  It doesn’t really matter, what does matter is that your technical and development teams and your business stakeholders have a common understanding of the terminology used and the progression that it implies.  Otherwise you run the risk of having a huge misalignment of expectations.  Technical people will know that a large amount of work is needed to mature and “harden” a prototype into an MVP, while your business stakeholders may see the prototype and think to themselves, “we’re only a week or two away from being able to make this available to everyone!”.

Have a real solution to a real problem

One of the key things to being successful is having a good idea for a cognitive application.  Many people come up with “cool” ideas for applications, and even create new and inventive capabilities using the IBM Watson cognitive services.  This is great – but it can lead to you burning time on projects that will never be funded or fully supported by your organization.  These types of things should be done as “open source” projects.  Develop your idea, learn more about the capabilities, and share your ideas with the world – while demonstrating your understanding of the cognitive space.

For those of you working for an organization that you want to fund and support your idea, you need to make sure that your idea provides a real solution to a real business problem.  It should provide a competitive advantage if not save your organization money, or both.  You should be able to roughly quantify the benefits of your cognitive application.  If you want your organization to spend money to develop your application or solution, they have to have a reasonable expectation that your efforts will be worth the time and money spent.  It also needs to have a clear benefit to the end user.  If nobody wants to use this, then how much benefit can it really have?

The best way to do this is to build a two slide slide deck.  I know, I know…. Powerpoint and slide decks are evil – but in this case your effort will save you time and provide a vision for your efforts in the future.  Slide one should be a quick description of the problem that your cognitive application or solution will solve.  Describe the problem, and highlight the negative impact that it has.  Get quotes from leaders within your industry or organization that highlight the negative impact – and use them.  Slide two should be a high level description of your cognitive application or solution.  Don’t get too detailed – just describe how you will solve the problem, and then highlight the benefits of your solution.  Don’t neglect to highlight the consequences of  failing to solve the problem, it helps put the effort into context.  Now make sure that EVERYONE on your team has access to this slide deck, since EVERYONE (developers, business analysts, project managers, and the receptionist) on the team should be aware of what your primary goals are, and should be able to communicate that.

I know that this is “Business 101” kind of guidance, but you would be amazed at how many teams are unable to explain WHAT they are building, and WHY it is important.  Even worse is when the technical leadership thinks that they are building one thing, the business leadership thinks they are building something else, and the development team is actually building something that is neither of the two.  It is also important that you keep this deck updated.  Keep in mind that situations change, and that the benefits of your solution may change based on your competitors, the business environment, and other outside factors.  The key here is to keep it simple, brief, and easy for EVERYONE involved to understand.  You need to be able to “sell” this idea to anyone who questions your use of people, time and money – from the most senior Executive, to the most junior developer.


So now we have an idea, a mission for the team, and some succinct benefits that your cognitive application or solution can provide.  That should help us articulate our vision and our mission to our technical stakeholders and our business stakeholders.  We should have ALL of the people involved having a similar understanding of how things will progress, and what it is that we are actually building.  In Part 2 of this series of blog posts, I will explore the use Agile development methods, and how to dig into the real work of developing a cognitive application.

Thanks to my fellow Watson architects for their input and observations on cognitive application maturity.  The version that I shared in this blog post bears little resemblance to what I originally started with….